From beb4538f61aaa16af798113d236a1738b5d303a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A5=9E=E4=BB=99=E9=83=BD=E6=B2=A1=E7=94=A8?= <615206459@qq.com> Date: Thu, 22 Aug 2024 16:26:22 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E8=8F=9C=E5=8D=95=E5=88=97=E8=A1=A8?= =?UTF-8?q?=E3=80=91=E8=A7=A3=E5=86=B3=E5=AD=90=E9=9B=86=E8=BF=87=E5=A4=9A?= =?UTF-8?q?=E5=AF=BC=E8=87=B4=E5=B1=95=E5=BC=80=E5=8D=A1=E9=A1=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/modules/base/views/menu/index.vue | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/modules/base/views/menu/index.vue b/src/modules/base/views/menu/index.vue index e6c9d5f..9698d4c 100644 --- a/src/modules/base/views/menu/index.vue +++ b/src/modules/base/views/menu/index.vue @@ -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); } }