页面代码
<div class="demo">

<<input type="checkbox" id="jack" value="Jack" v-model="checkedNames">
<label for="jack">Jack</label>
<input type="checkbox" id="john" value="John" v-model="checkedNames">
<label for="john">John</label>
<input type="checkbox" id="mike" value="Mike" v-model="checkedNames">
<label for="mike">Mike</label>
<br>
<span>Checked names:{{checkedNames}} </span>
</div>

逻辑
<script src="vue.js"></script>
<script>
var value=[{
'name':0,
'age':12,
'sex':'男'
},{
'name':1,
'age':12,
'sex':'男'
},{
'name':2,
'age':12,
'sex':'男'
}];

new Vue({
el: '.demo',
data: {
  checkedNames: []
}
})
</script>
 

转载于:https://www.cnblogs.com/qiruoranbeginner/p/7489586.html

Logo

前往低代码交流专区

更多推荐