[Vuejs]-Object data overide all previous data

0👍

The problem is you need to have a key that uniquely identifies each of your elements. https://v2.vuejs.org/v2/guide/list.html#key
I suggest adding this

this.quote.id = this.counter;
this.quote.key = + new Date();//new property 

then in your other component

<div class="col-md-3" v-for="(quote,$index) in quotes" @click="deleteQuote($index)" :key="quote.key">

Don’t use your id as your key as it changes based on the position the quote is in the array.

👤qw3n

Leave a comment