来自:
https://juejin.im/post/5cf24f1ee51d4577583ddc77 侵删
this.deviceTableData = res.body || [];
// console.log("this.deviceTableData", this.deviceTableData);
//默认全选
this.$nextTick(() => {
for (let i = 0; i < this.deviceTableData.length; i++) {
this.$refs.multipleTableDevice.toggleRowSelection(
this.deviceTableData[i],
true
);
}
});
主要是 “
toggleRowSelection
” 设置