mirror of
https://github.com/ElemeFE/element.git
synced 2025-12-19 12:04:02 +08:00
Tree: Modify loop conditions to improve performance (#15699)
This commit is contained in:
@@ -44,10 +44,7 @@ export default class TreeStore {
|
||||
|
||||
if (!node.visible && childNodes.length) {
|
||||
let allHidden = true;
|
||||
|
||||
childNodes.forEach((child) => {
|
||||
if (child.visible) allHidden = false;
|
||||
});
|
||||
allHidden = !childNodes.some(child => child.visible);
|
||||
|
||||
if (node.root) {
|
||||
node.root.visible = allHidden === false;
|
||||
|
||||
Reference in New Issue
Block a user