From 5a3698a8c7a088b3a636b1ef1ddd5bc2cdc13c58 Mon Sep 17 00:00:00 2001 From: yyh <24493052+yongheng2016@users.noreply.github.com> Date: Thu, 5 Dec 2024 21:57:52 +0800 Subject: [PATCH] fix: fix controlhub menu --- apps/adminConsole/package.json | 2 +- apps/adminConsole/src/layouts/MainLayout.vue | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/apps/adminConsole/package.json b/apps/adminConsole/package.json index 940d342..68818a5 100644 --- a/apps/adminConsole/package.json +++ b/apps/adminConsole/package.json @@ -1,6 +1,6 @@ { "name": "@apps/admin_console", - "version": "0.4.7", + "version": "0.4.8", "description": "Control Hub", "productName": "Control Hub", "private": true, diff --git a/apps/adminConsole/src/layouts/MainLayout.vue b/apps/adminConsole/src/layouts/MainLayout.vue index 042dce5..66db932 100644 --- a/apps/adminConsole/src/layouts/MainLayout.vue +++ b/apps/adminConsole/src/layouts/MainLayout.vue @@ -75,7 +75,12 @@ const selectHandler = (data: any) => { onMounted(() => { const link = route.path.split('/')[1]; - const target = optionsAll.find((item) => item.link === `/${link}`); + let target: any = optionsAll[0]; + if (link === 'site-middleware') { + target = optionsAll.find((item) => item.link === route.path); + } else { + target = optionsAll.find((item) => item.link === `/${link}`); + } if (target) { active.value = target.key; splitMenu.changeStatus(target.key);