https://blog.csdn.net/a772116804/article/details/106217414
//这要放在数据加载完成后,且this.$nextTick(()=》{})不能少,少了后没效果
this.$nextTick(()=>{
//已经选择了的信息
let pastSelect = this.multipleSelection.map(item => {return item.id})
//list 所有的数据信息
this.list.forEach(row => {
//判断是否与已选信息对应,是就使用toggleRowSelection(row,true)将选项默认选中
if(pastSelect.indexOf(row.id) >= 0){
this.$refs.multipleTable.toggleRowSelection(row,true);
}
})
})