<ul class="list-group" v-for="item in items">
<li @click="reciveitems(item)" class="list-group list-group-item"><img :src="item.img" class="rounded mx-auto" :alt="item.name">
<p class="count position-absolute">{{ item.count }}</p>
<p class="name position-absolute">{{ item.name }}</p>
</li>
</ul>
<ul id="example-2">
<li v-for="(item, index) in items">
{{ parentMessage }} - {{ index }} - {{ item.message }}
</li>
</ul>
<ul id="example-2">
<li v-for="(item, index) in items" @click="selectAllExcept(index)">
{{ parentMessage }} - {{ index }} - {{ item.message }}
</li>
</ul>
methods: {
selectAllExcept(index) {
this.items.forEach((el, i) => {
el.selected = i !== index;
})
}
}