mirror of
https://github.com/cool-team-official/cool-admin-vue.git
synced 2024-11-01 14:10:27 +08:00
【菜单列表】解决子集过多导致展开卡顿
This commit is contained in:
parent
beb4538f61
commit
ce3c6df27e
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user