diff --git a/packages/global-util-design/src/hooks/router-hook.ts b/packages/global-util-design/src/hooks/router-hook.ts index 89dac9e0e5695b4cbfbe896e258133c02fbd8fe5..b34b51f6bead1271b6275598cb73e88599d6912c 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); + } } } });