全选按钮
<th style="width:5%;text-align: center">
全选
<input type="checkbox" @click="checkAll($event)" name="" id="selectAll">
</th>
单选按钮
<td class="fatherTd">
<input type="checkbox" class="checkItem" v-model='item.flag'@click='checkItems($event)'/>
</td>
js
//点击全选
checkAll(e) {
var checkObj = document.querySelectorAll(".checkItem");
if (e.target.checked) {
for (let i = 0; i < checkObj.length; i++) {
checkObj[i].checked = true;
}
for (var x in this.siylist) {
this.siylist[x].flag = true;
}
} else {
for (let i = 0; i < checkObj.length; i++) {
ch