From 08cfa167a8d7e2e60f076d39b2f091aa42fe8f8f Mon Sep 17 00:00:00 2001 From: xlsea Date: Tue, 14 Oct 2025 10:29:35 +0800 Subject: [PATCH] =?UTF-8?q?feat(components):=20=E8=8F=9C=E5=8D=95=E6=A0=91?= =?UTF-8?q?=E9=80=89=E6=8B=A9=E7=BB=84=E4=BB=B6=E6=96=B0=E5=A2=9E=E9=9A=90?= =?UTF-8?q?=E8=97=8F=E7=A6=81=E7=94=A8=E6=A0=87=E8=AF=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/custom/menu-tree.vue | 18 ++++++++++++++++++ src/views/system/dict/index.vue | 2 +- 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/src/components/custom/menu-tree.vue b/src/components/custom/menu-tree.vue index ace8efee..64f6853e 100644 --- a/src/components/custom/menu-tree.vue +++ b/src/components/custom/menu-tree.vue @@ -66,6 +66,24 @@ function renderLabel({ option }: { option: TreeOption }) { if (label?.startsWith('route.') || label?.startsWith('menu.')) { label = $t(label as App.I18n.I18nKey); } + // 禁用的菜单显示红色 + if (option.status === '1') { + return ( +
+ {label} + +
+ ); + } + // 隐藏的菜单显示灰色 + if (option.visible === '1') { + return ( +
+ {label} + +
+ ); + } return
{label}
; } diff --git a/src/views/system/dict/index.vue b/src/views/system/dict/index.vue index 22d26df5..38ac991a 100644 --- a/src/views/system/dict/index.vue +++ b/src/views/system/dict/index.vue @@ -234,7 +234,7 @@ function handleClickTree(keys: string[]) { } function handleResetTreeData() { - dictPattern.value = undefined; + dictPattern.value = ''; getTreeData(); }