-
Notifications
You must be signed in to change notification settings - Fork 42
Open
Description
是smooth方法中reduce导致的,改成下面这种效果可能要好一点。
smoothTree(treeData, array) {
for (const data of treeData) {
if (data.visible) {
// Mark different types to avoid being optimized out when assembled into the same dom
data.type = this.showCheckbox
? ${data.level}-${data.checked}-${data.indeterminate}
: ${data.level}-${data.expanded}
;
array.push(data);
}
if (data.expanded && data.childNodes.length) {
this.smoothTree(data.childNodes, array)
}
}
}
Metadata
Metadata
Assignees
Labels
No labels