From 016a3fa641c8654b4bfaa1488b064da72f20ac88 Mon Sep 17 00:00:00 2001 From: BianLzhaoMin <11485688+bianliangzhaomin123@user.noreply.gitee.com> Date: Wed, 2 Apr 2025 17:44:08 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8A=A8=E6=80=81=E6=9D=83=E9=99=90=E9=85=8D?= =?UTF-8?q?=E7=BD=AE=E5=A2=9E=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/workbenches/index.vue | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/pages/workbenches/index.vue b/src/pages/workbenches/index.vue index 38a8c0f..9a1bf27 100644 --- a/src/pages/workbenches/index.vue +++ b/src/pages/workbenches/index.vue @@ -55,7 +55,11 @@ const iconList_2 = ref([ }, ]) +// 判读用户的 permissions 是否有对应的权限,没有就隐藏 if (userPermissions.value.length > 0) { + const permissionSet = new Set(userPermissions.value.map((item) => item.name)) + // iconList_1.value = iconList_1.value.filter((item) => permissionSet.has(item.title)) + // iconList_2.value = iconList_2.value.filter((item) => permissionSet.has(item.title)) }