mirror of
https://gh-proxy.org/https://github.com/klinsmaya/SQLBot.git
synced 2026-11-09 09:46:55 +08:00
perf: Adjust the assistant menu position
This commit is contained in:
committed by
fit2cloud-chenyw
parent
f759dce8c1
commit
fc6a740a3f
@@ -24,10 +24,22 @@ const dynamicRouterList = [
|
||||
],
|
||||
},
|
||||
{
|
||||
parent: 'set',
|
||||
path: '/set/assistant',
|
||||
name: 'setAssistant',
|
||||
component: SetAssistant,
|
||||
path: '/as',
|
||||
component: LayoutDsl,
|
||||
name: 'as-menu',
|
||||
redirect: '/as/index',
|
||||
children: [
|
||||
{
|
||||
path: 'index',
|
||||
name: 'as',
|
||||
component: SetAssistant,
|
||||
meta: {
|
||||
title: t('embedded.assistant_app'),
|
||||
iconActive: 'embedded',
|
||||
iconDeActive: 'noEmbedded',
|
||||
},
|
||||
},
|
||||
],
|
||||
meta: { title: t('embedded.assistant_app') },
|
||||
},
|
||||
] as any[]
|
||||
|
||||
@@ -39,7 +39,7 @@ export const watchRouter = (router: Router) => {
|
||||
if (!userStore.getUid) {
|
||||
await userStore.info()
|
||||
generateDynamicRouters(router)
|
||||
isFirstDynamicPath = to?.path && ['/ds/index', '/set/assistant'].includes(to.path)
|
||||
isFirstDynamicPath = to?.path && ['/ds/index', '/as/index'].includes(to.path)
|
||||
if (isFirstDynamicPath) {
|
||||
next({ ...to, replace: true })
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user