diff --git a/web/src/layouts/frontend/components/aside.vue b/web/src/layouts/frontend/components/aside.vue index b3a2f98f..101156e8 100644 --- a/web/src/layouts/frontend/components/aside.vue +++ b/web/src/layouts/frontend/components/aside.vue @@ -36,7 +36,7 @@
@@ -60,10 +60,10 @@ const router = useRouter() const userInfo = useUserInfo() const memberCenter = useMemberCenter() -const routerPush = (routeName: string, route?: RouteRecordRaw) => { - if (routeName) { - router.push({ name: routeName }) - } else if (route) { +const routerPush = (route: string | RouteRecordRaw) => { + if (typeof route === 'string') { + router.push({ name: route }) + } else { onClickMenu(route) } }