From 4dc44dc7e6a029b5c35a9fdf9d5dbf806a31c60f Mon Sep 17 00:00:00 2001 From: yangduo Date: Wed, 31 Jul 2024 11:16:04 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/router/index.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/router/index.js b/src/router/index.js index cb9259b..0c62dc0 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -97,6 +97,11 @@ export const constantRoutes = [ } ] }, + { + path: '*', // 匹配未定义的路由 + redirect: '/dashboard', // 重定向 + hidden: true + }, { path: '*', // 匹配未定义的路由 redirect: '/404', // 重定向