<input type="text" v-model="id">
<input type="text" v-model="name">
<button @click="add"></button>
<ul>
<li v-for="item in list">
{{item.name}}
<input type="checkbox"/>

</li>

</ul>

 

add(){
this.list.push({id:this.id,name:this.name})
}

posted on 2020-05-14 22:34  心意如水hucuie22  阅读(427)  评论(0编辑  收藏  举报