注意要先清空一下选择框,回填的item尽量选所有列的对象
//选中列,所有列,表名
toggleSelection(selectRows, totalRows, tablename) {
this.$refs[tablename].clearSelection();
if (selectRows.length>0) {
this.$nextTick(() => {
totalRows.forEach(row => {
selectRows.forEach(item => {
//判断条件
if(item.id == row.id){
this.$refs[tablename].toggleRowSelection(item);
}
})
})
})
}
},