I have my current configuration set up as depicted below:
[{
name: "test",
tags: ["aa","bb","v"]
},
...]
<div class="item" v-for="item in sdList" :data-id="item.id">
<span @click="deleteTag(item, $event)" v-for="tag in item.tags">{{tag}}</span>
</div>
methods: {
deleteTag(item,event){
event.target.style.display = "none";
}
}
The issue is that event.target
or event.currentTarget
does not function correctly. currentTarget
does not refer to the element after the bubbling process completes, and target
sometimes points to the wrong object.
How can I implement the v-show
directive here, or do you have any other solutions?