修复 Tree 组件节点勾选异常问题 (#2449)

This commit is contained in:
RickCole 2021-08-26 19:54:59 +08:00 committed by GitHub
parent a799703409
commit f86872695f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -290,7 +290,7 @@ export class TreeSelector extends React.Component<
let child = children.shift();
let index = value.indexOf(child);
if (child.children) {
if (child.children && child.children.length) {
children.push.apply(children, child.children);
} else if (!~index && child.value !== 'undefined') {
value.push(child);