1👍
There is quite a bit of unusual code in the example, so I may be missing something, but couldn’t you just pass the item
to the method.
<p
v-if="item.popUpTypeType === 'danger'"
class="closing-x"
@click="closeMessage(item)"
>X</p>
and then
closeMessage(item) {
const index = this.array.indexOf(item);
if (index >= 0) this.array.splice(index, 1)
},
- [Vuejs]-Cordova local storage doesn't clear when new app is installed
- [Vuejs]-How to return current user information from MongoDB in a MEVN stack app
Source:stackexchange.com