Answer the question
In order to leave comments, you need to log in
Valid display issue with v-for + vuex?
There is a storage in which data can change at any time:
storage:
cars: [
{
name: 'Debian',
},
{
name: 'Ss'
},
{
name: 'Gorsto'
},
],
deleteCarFromArray: (state, payload) => {
state.cars[payload] = {InfoCreate: -1}
},
carInfoGetter(store){
return [...store.cars]
}
filteredCards() {
return this.$store.getters.carInfoGetter.filter((el) => {
return el.InfoCreate !== -1 && el.InfoCreate !== -2;
});
<div v-for="(card, index) in filteredCards" :key="index.id">
...
</div>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question