[Vuejs]-Vue cannot change attribute in nested v-for

0👍

You’re running into the reactivity caveat because you are trying to use data properties that don’t exist at the time of rendering.

Use Vue.set when setting those properties:

this.todos.forEach(e => { 
   this.$set(e, 'clicked', false);  // `Vue.set` in a module
});

Leave a comment