mirror of
https://github.com/vbenjs/vue-vben-admin.git
synced 2025-01-25 02:58:43 +08:00
fix(treeHelper): 修复 listToTree 方法 parent 获取 children 问题 (#1464)
This commit is contained in:
parent
05bad7b9dc
commit
b70fade587
@ -24,7 +24,7 @@ export function listToTree<T = any>(list: any[], config: Partial<TreeHelperConfi
|
||||
}
|
||||
for (const node of list) {
|
||||
const parent = nodeMap.get(node[pid]);
|
||||
(parent ? parent.children : result).push(node);
|
||||
(parent ? parent[children] : result).push(node);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user