refactor(功能用例): 优化展开子节点

This commit is contained in:
teukkk 2024-07-12 18:48:04 +08:00 committed by Craftsman
parent dd578a6633
commit 949ede28f7
1 changed files with 2 additions and 1 deletions

View File

@ -177,7 +177,8 @@ export function handleRenderNode(node: MinderJsonNode, renderNode: MinderJsonNod
export function expendNodeAndChildren(node: MinderJsonNode) { export function expendNodeAndChildren(node: MinderJsonNode) {
if (node.children?.length) { if (node.children?.length) {
node.expand(); node.expand();
handleRenderNode(node, node.children); node.renderTree();
node.layout();
node.children?.forEach((child) => expendNodeAndChildren(child)); node.children?.forEach((child) => expendNodeAndChildren(child));
} }
} }