Commit ddc798b2 authored by ibuler's avatar ibuler

[Bugfix] 修复节点搜索的问题

parent dce09d39
......@@ -206,10 +206,11 @@ export class ElementAssetTreeComponent implements OnInit, OnChanges {
if (!children) {
return [];
}
let all_children = [];
children.forEach((n) => {
return [...children, ...this.recurseChildren(n)];
all_children = [...children, ...this.recurseChildren(n)];
});
return [];
return all_children;
}
filter() {
......@@ -221,6 +222,9 @@ export class ElementAssetTreeComponent implements OnInit, OnChanges {
const nodes = zTreeObj.transformToArray(zTreeObj.getNodes());
if (!_keywords) {
zTreeObj.showNodes(nodes);
zTreeObj.expandAll(false);
const root = zTreeObj.getNodes()[0];
zTreeObj.expandNode(root);
return null;
}
let shouldShow = [];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment