From cfaad235be6a6a05d6251fc56de654df76fd8a84 Mon Sep 17 00:00:00 2001 From: ZSEN Date: Tue, 11 May 2021 14:39:49 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AD=90=E8=8F=9C=E5=8D=95=E4=B8=AA=E6=95=B0?= =?UTF-8?q?=E9=99=90=E5=88=B6=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/store/modules/menu.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/store/modules/menu.js b/src/store/modules/menu.js index 1e28924..830e8ff 100644 --- a/src/store/modules/menu.js +++ b/src/store/modules/menu.js @@ -38,7 +38,7 @@ const getFilterMenus = (arr, role, parentPath = '') => { icon: item.icon, } if (item.children) { - if (item.children.length === 1) { + if (item.children.filter(child => !child.hidden).length <= 1) { menu.url = generateUrl(item.children[0].path, menu.url) } else { menu.children = getFilterMenus(item.children, role, menu.url)