mirror of
https://github.com/cool-team-official/cool-admin-vue.git
synced 2024-11-01 06:02:38 +08:00
【菜单列表】解决子集过多导致展开卡顿
This commit is contained in:
parent
be311cdfb5
commit
beb4538f61
@ -410,14 +410,13 @@ function onData(list: Item[]) {
|
||||
|
||||
// 监听子节点数据的加载
|
||||
function onChildrenLoad(row: Item, treeNode: unknown, resolve: (data: Item[]) => void) {
|
||||
resolve(row._children!);
|
||||
resolve(row._children || []);
|
||||
}
|
||||
|
||||
// 行点击展开
|
||||
function onRowClick(row: Item) {
|
||||
if (row._children) {
|
||||
row.children = row._children;
|
||||
Table.value?.toggleRowExpansion(row);
|
||||
Table.value?.Table.store.loadOrToggle(row);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user