比如在弹窗中使用,反选,弹窗打开的时候需要拿到数据去反选
this.$nextTick(() => {
// this.selectIds 选中的id集合
// this.knowledgeList table列表
this.selectIds?.forEach(item => {
const checkItem = this.knowledgeList.find(v => v.relatedId == item.knowledgeId)
if (checkItem) {
// this.$refs.dialogTable获取到你自己定义的弹窗表格ref
this.$refs.multipleTable.toggleRowSelection(checkItem)
}
})
})