在Table Methods里面有个方法:
toggleRowSelection用于多选表格,切换某一行的选中状态,如果使用了第二个参数,则是设置这一行选中与否(selected 为 true 则选中)row, selected
rows:传进来的是个数组对象
/反选
InvertSelection(rows) {
rows.forEach(row => {
this.$refs.multipleTable.toggleRowSelection(row);
})
}
转载请注明原文地址: https://mac.8miu.com/read-503858.html