树形表格取消父级选择时,删除按钮还能删除子节点问题。

e4e72887ba
This commit is contained in:
Zheng Jie
2022-08-09 16:13:24 +08:00
parent cda3adca93
commit d9090877c6

View File

@@ -480,6 +480,7 @@ function CRUD(options) {
toggleRowSelection(selection, data) {
if (data.children) {
data.children.forEach(val => {
selection.splice(selection.findIndex(item => this.getDataId(item) === this.getDataId(val)), 1)
crud.getTable().toggleRowSelection(val, false)
if (val.children) {
crud.toggleRowSelection(selection, val)