From d0743c5024c7f1bb9be5719a5c6af26dd967ccf5 Mon Sep 17 00:00:00 2001 From: weizong song Date: Mon, 8 Jun 2026 23:36:16 +0800 Subject: [PATCH] =?UTF-8?q?=E5=90=8E=E5=8F=B0=E6=A0=B9=E8=B7=AF=E5=BE=84?= =?UTF-8?q?=E8=87=AA=E5=8A=A8=E8=BF=9B=E5=85=A5=E9=A6=96=E9=A1=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/router/index.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/router/index.ts b/src/router/index.ts index fbd858f..309f9b4 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -164,9 +164,16 @@ router.beforeEach(async (to) => { if (!adminDynamicRoutesRegistered()) { await registerAdminDynamicRoutes(router) + if (to.name === 'AdminLayout' || to.path === '/admin') { + return { name: 'admin-dashboard', replace: true } + } return { ...to, replace: true } } + if (to.name === 'AdminLayout' || to.path === '/admin') { + return { name: 'admin-dashboard', replace: true } + } + return true }