在开发中我们经常遇见,element ui表格中选中的数据,如果对选中的数据进行操作之后,需要取消选中状态,不单单需要将multipleSelection当中的值为空。还需要将选中的状态取消
再取消的时候,找到列表的数据然后对列表的数据进行操作,代码如下
this.$nextTick(() => {
this.list.forEach(row => {
// multipleTable :弹窗中table 写上 ref="multipleTable "
this.$refs.multipleTable.toggleRowSelection(row, false);
});
})
将list的数据换成需要取消的数据就可以