<template><div><!--给全选按钮绑定v-mode变量,值为true时就是选中状态,绑定点击事件,执行全选和反选操作--><inputtype='checkbox'class='input-checkbox'v-model='checked'v-on:click='checkedAll'>全选
<divv-for='checkb in checkboxData':key="checkb.id"><!--给每个复选按钮绑定同一个v-mode数组变量,数组里面有相应的value就被选中--><inputtype='checkbox'name='checkboxinput'class='input-checkbox'v-model='checkboxList':value="checkb.id">{{checkb.value}}
</div></div></template>