You are binding v-model directly to a v-for iteration alias.
<script src="//cdnjs.cloudflare.com/ajax/libs/vue/2.5.18/vue.js"></script><table id="app"><tr v-for="(run, index) in settings.
·
<script src="//cdnjs.cloudflare.com/ajax/libs/vue/2.5.18/vue.js"></script>
<table id="app">
<tr v-for="(run, index) in settings.runs">
<td>
<input type="text" :name="'run'+index" v-model="settings.runs[index]" />
</td>
<td>
<button @click.prevent="removeRun(index)">X</button>
</td>
<td>{{run}}</td>
</tr>
</table>
通过这种手段来解决这个问题
更多推荐
已为社区贡献12条内容
所有评论(0)