vue.js - "You are binding v-model directly to a v-for iteration alias" - Stack Overflow

PHOTO EMBED

Sat Jul 23 2022 17:48:06 GMT+0000 (Coordinated Universal Time)

Saved by @mnplus #javascript

new Vue({
  el: '#app',
  data: {
    settings: {
      runs: [1, 2, 3]
    }
  },
  methods: {
    removeRun: function(i) {
      console.log("Remove", i);
      this.settings.runs.splice(i,1);
    }
  }
});
content_copyCOPY

V-Model inside v-for loop, to assign index to single element and not all of the v-model

https://stackoverflow.com/questions/42629509/you-are-binding-v-model-directly-to-a-v-for-iteration-alias