From a1b8e0c0cf01f7aba9818b8b0efc1d922374d9d2 Mon Sep 17 00:00:00 2001 From: zhf <1204297681@qq.com> Date: Tue, 8 Jul 2025 21:09:39 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E7=B3=BB=E7=BB=9F=E8=BF=90=E7=BB=B4?= =?UTF-8?q?=E7=8A=B6=E6=80=81=E9=A1=B5=E9=9D=A2=E5=88=B7=E6=96=B0=E5=90=8E?= =?UTF-8?q?=E8=B7=B3=E8=BD=AC=E9=A6=96=E9=A1=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/hooks/router-hook.ts | 20 ++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/packages/global-util-design/src/hooks/router-hook.ts b/packages/global-util-design/src/hooks/router-hook.ts index 89dac9e0..b34b51f6 100644 --- a/packages/global-util-design/src/hooks/router-hook.ts +++ b/packages/global-util-design/src/hooks/router-hook.ts @@ -1,4 +1,4 @@ -import { routePath2string } from '@ibiz-template/vue3-util'; +import { routePath2string, route2routePath } from '@ibiz-template/vue3-util'; import { Router } from 'vue-router'; export function routerHook(): void { @@ -29,6 +29,24 @@ export function routerHook(): void { ], }); ibiz.openView.push(path); + } else { + const appUtil = ibiz.appUtil as IData; + const router: Router = appUtil.router; + const routePath = route2routePath(router.currentRoute.value); + if ( + routePath.pathNodes[0] && + routePath.pathNodes[0].viewName === 'devsysstateview' + ) { + const path = routePath2string({ + appContext: ibiz.appUtil.getAppContext(), + pathNodes: [ + { + viewName: ibiz.hub.defaultAppIndexViewName.toLowerCase(), + }, + ], + }); + ibiz.openView.push(path); + } } } }); -- Gitee