Skip to content

Commit f58988c

Browse files
perf: Adjust the assistant menu position
1 parent f759dce commit f58988c

File tree

2 files changed

+17
-5
lines changed

2 files changed

+17
-5
lines changed

frontend/src/router/dynamic.ts

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,22 @@ const dynamicRouterList = [
2424
],
2525
},
2626
{
27-
parent: 'set',
28-
path: '/set/assistant',
29-
name: 'setAssistant',
30-
component: SetAssistant,
27+
path: '/as',
28+
component: LayoutDsl,
29+
name: 'as-menu',
30+
redirect: '/as/index',
31+
children: [
32+
{
33+
path: 'index',
34+
name: 'as',
35+
component: SetAssistant,
36+
meta: {
37+
title: t('embedded.assistant_app'),
38+
iconActive: 'embedded',
39+
iconDeActive: 'noEmbedded',
40+
},
41+
},
42+
],
3143
meta: { title: t('embedded.assistant_app') },
3244
},
3345
] as any[]

frontend/src/router/watch.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ export const watchRouter = (router: Router) => {
3939
if (!userStore.getUid) {
4040
await userStore.info()
4141
generateDynamicRouters(router)
42-
isFirstDynamicPath = to?.path && ['/ds/index', '/set/assistant'].includes(to.path)
42+
isFirstDynamicPath = to?.path && ['/ds/index', '/as/index'].includes(to.path)
4343
if (isFirstDynamicPath) {
4444
next({ ...to, replace: true })
4545
return

0 commit comments

Comments
 (0)