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

This commit is contained in:
Mr9eng
2022-08-09 15:41:58 +08:00
committed by GitHub
parent 5362555d06
commit e4e72887ba

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)