样式
/deep/ thead {
.el-table-column--selection {
.cell {
display: none;
}
}
}
js
handleSelectionChange(val) {
if (val.length > 1) {
this.$refs.table.clearSelection();
this.$refs.table.toggleRowSelection(val[val.length - 1]);
}
// this.selectObj 就是选中的对象数据
this.selectObj = val[val.length - 1];
if(!this.selectObj) {
this.selectObj = {}
}
},
currentChange(val) {
this.$refs.table.toggleRowSelection(val);
},
html
`