fix: fix cacheExpandedKeys bug

This commit is contained in:
gx-mac 2021-03-08 17:28:03 +08:00
parent ef1acc2aba
commit edde294f3a
1 changed files with 1 additions and 1 deletions

View File

@ -818,7 +818,7 @@ onExpand(treeNode,keyType) {
} else if (props.autoExpandParent) {
expandedPositionArr.forEach(p => {
if ((p.split('-').length > pos.split('-').length && isInclude(pos.split('-'), p.split('-')) || pos === p) && filterExpandedKeys.indexOf(newKey) === -1) {
if (!props.canCloseFreely || this.cacheExpandedKeys.has(newKey)) {
if (!props.canCloseFreely || (this.cacheExpandedKeys ? this.cacheExpandedKeys.has(newKey) : true)) {
filterExpandedKeys.push(newKey);
}
}