【菜单列表】解决子集过多导致展开卡顿

This commit is contained in:
神仙都没用 2024-08-22 20:32:32 +08:00
parent beb4538f61
commit ce3c6df27e

View File

@ -393,6 +393,13 @@ function onData(list: Item[]) {
//
const deep = (arr: Item[]) => {
arr.forEach((e) => {
const nodes: { [key: number]: Item[] } =
Table.value?.Table.store.states.lazyTreeNodeMap.value || {};
if (nodes[e.id!]) {
nodes[e.id!] = e.children!;
}
if (!isEmpty(e.children)) {
e.hasChildren = true;
e._children = e.children;