<el-table ref=“multipleTable” :data=“goodslist” tooltip-effect=“dark” @selection-change=“handleSelection” >
{ { scope.$index }}
这是回选操作
methods: {
toggleSelection(rows) {
console.log(‘rows’,rows)
if (rows) {
rows.forEach(row => {
// this.$refs.multipleTable.toggleRowSelection(row)
this.KaTeX parse error: Expected '}', got 'EOF' at end of input: …ck( ()=> {this.refs.multipleTable.toggleRowSelection(row);})
});
} else {
this.$refs.multipleTable.clearSelection();
}
},
}
点击选择或全选 。 this.current 是当前页码, 然后进行缓存
handleSelection(val) {
this.multipleSelection = val;
this.multipleSelectall[this.current] =