https://element.eleme.cn/#/zh-CN/component/table elementui官网
这个问题昨天有遇到,也去element官网看了,它有的我也写上去了,为什么没有回显,就很奇怪哈--看图
toggleSelection() { //切换选中状态按钮
if (this.$props.activeChange) {
this.$props.activeChange.forEach(row => {
this.$refs.multipleTable.toggleRowSelection([{id:0}, {id:1}]);
});
} else {
this.$refs.multipleTable.clearSelection();
}
}
this.$props.activeChange是传过来的数据 ,在这里回显的id我是写si的,却是上图一的样子..
后面是去上网查找了,网上说的也是云里雾里的,同样也没回显出来,但是它这个显了又没完全显的样子
网上是还需加属性-- 注意:el-table属性 :row-key="row => row.id"