ele单元格用toggleRowSelection(row, true)回显时row必须返回当前列表渲染用的数据,自己存的数据是无效的
// 按数组回显选择框
echoCheckbox() {
...
this.selectObj[this.page].forEach(_item => {
this.tableData.forEach(item => {
if (this.whetherInclude(_item, item)) {
// 这里的item必须是渲染列表的数据 必要时请使用this.$nextTick
this.$nextTick(() => this.$refs.checkTable.toggleRowSelection(item, true))
}
})
})
...
}