From 226be89e314fbd7edb2e0628d48a50eb3258b1f1 Mon Sep 17 00:00:00 2001 From: TsMask <340112800@qq.com> Date: Tue, 17 Oct 2023 14:23:40 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E8=BF=87=E6=BB=A4=E6=97=A7=E5=89=8D?= =?UTF-8?q?=E7=AB=AF=E8=8F=9C=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/store/modules/router.ts | 4 ++++ src/views/system/menu/index.vue | 2 ++ 2 files changed, 6 insertions(+) diff --git a/src/store/modules/router.ts b/src/store/modules/router.ts index cbb706f7..fa6e2658 100644 --- a/src/store/modules/router.ts +++ b/src/store/modules/router.ts @@ -78,6 +78,10 @@ type RecordRaws = { function buildRouters(recordRaws: RecordRaws[]): RouteRecordRaw[] { const routers: RouteRecordRaw[] = []; for (const item of recordRaws) { + // 过滤旧前端菜单 是layui的菜单跳过 + if (['', '/page"'].includes(item.path)) { + continue; + } // 路由页面组件 let component: RouteComponent = {}; if (item.component) { diff --git a/src/views/system/menu/index.vue b/src/views/system/menu/index.vue index d521e9e9..f6bb58db 100644 --- a/src/views/system/menu/index.vue +++ b/src/views/system/menu/index.vue @@ -424,6 +424,8 @@ function fnGetList() { tableState.loading = true; listMenu(toRaw(queryParams)).then(res => { if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.data)) { + // 过滤旧前端菜单 + res.data = res.data.filter(i => i.perms !== 'page'); menuListData = JSON.parse(JSON.stringify(res.data)); // 初始上级菜单和展开编号key if (treeDataAll.length <= 0) {