Vue -- element-ui el-table 选择回显
// 取出存储的id
var clueId = "1138334945442639872";
mycustomVM.$nextTick(function(){
var storage = [];
mycustomVM.dataTable.forEach(function(item, index) {
if (item.clueId === clueId ) {
storage.push(mycustomVM.dataTable[index]);
}
})
mycustomVM.toggleSelection(storage);
})
toggleSelection(rows) { // table select 默认选中fn
if (rows) {
rows.forEach(row => {
this.$refs.multipleTable.toggleRowSelection(row, true);
});
} else {
this.$refs.multipleTable.clearSelection();
}
},