From 0dd5044bbe4396b016e720dffcc5179711cd3998 Mon Sep 17 00:00:00 2001 From: lau <1807121535@qq.com> Date: Thu, 14 Aug 2025 09:07:35 +0800 Subject: [PATCH] =?UTF-8?q?update=20=E6=94=B6=E8=B5=B7=E8=8F=9C=E5=8D=95?= =?UTF-8?q?=E6=97=B6=E4=BB=8E=E5=B1=95=E5=BC=80=E5=88=97=E8=A1=A8=E4=B8=AD?= =?UTF-8?q?=E7=A7=BB=E9=99=A4=E5=AF=B9=E5=BA=94=E8=8F=9C=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/system/menu/index.vue | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/views/system/menu/index.vue b/src/views/system/menu/index.vue index 1916ca0..d281091 100644 --- a/src/views/system/menu/index.vue +++ b/src/views/system/menu/index.vue @@ -44,6 +44,7 @@ :default-expand-all="false" lazy :load="getChildrenList" + :expand-change="expandMenuHandle" > @@ -353,6 +354,13 @@ const getChildrenList = async (row: any, treeNode: unknown, resolve: (data: any[ resolve(children); }; +/** 收起菜单时从menuExpandMap中删除对应菜单id数据 */ +const expandMenuHandle = async (row: any, expanded: boolean) => { + if (!expanded) { + menuExpandMap.value[row.menuId] = undefined; + } +}; + /** 刷新展开的菜单数据 */ const refreshLoadTree = (parentId: string | number) => { if (menuExpandMap.value[parentId]) { -- Gitee