From 674fe82f4688ee31c664a359798a9c66ee2195ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A6=99=E7=A0=81=E7=94=9F=E8=8A=B1?= <18523774412@qq.com> Date: Mon, 11 Nov 2024 15:53:54 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=E4=BC=98=E5=8C=96=E4=BC=9A=E5=91=98?= =?UTF-8?q?=E4=B8=AD=E5=BF=83=E8=8F=9C=E5=8D=95=E7=82=B9=E5=87=BB=E6=97=B6?= =?UTF-8?q?=E7=9A=84=E5=A4=84=E7=90=86=E5=87=BD=E6=95=B0=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/src/layouts/frontend/components/aside.vue | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) 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) } }