<eclipse-item v-for="i in 5" :key="i" ><button @click="myMethod(i)">Что-то там</button></eclipse-item>
<div class="element" @dblclick="sendPost"></div>
methods: {
async sendPost() {
const response = await fetch('url',{
method: 'POST',
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify({'Тело запроса'})
})
}
}
<div class="gallery container">
<div
class="gallery-item"
v-for="(image, imageIndex) in images"
:key="imageIndex"
v-bind:style="{ 'background-image': 'url(' + image + ')' }"
>
<h2 class="title">
{{ titles[imageIndex].name }}
</h2>
>
</div>
</div>