From c5471b5fca18228b711d9b69f2b9bf1d52f2a424 Mon Sep 17 00:00:00 2001 From: pany <939630029@qq.com> Date: Sun, 3 Mar 2024 23:00:17 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20=E7=95=99=E7=94=A8=20404=20alias=20?= =?UTF-8?q?=E5=90=8C=E6=97=B6=E7=A7=BB=E9=99=A4=20ErrorPage=20=E8=B7=AF?= =?UTF-8?q?=E7=94=B1=20&&=20=E7=AE=80=E5=8C=96=20redirect=20=E8=B7=AF?= =?UTF-8?q?=E7=94=B1=20path?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/router/index.ts | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/src/router/index.ts b/src/router/index.ts index aa66c3f..fbfc2f1 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -17,7 +17,7 @@ export const constantRoutes: RouteRecordRaw[] = [ }, children: [ { - path: "/redirect/:path(.*)", + path: ":path(.*)", component: () => import("@/views/redirect/index.vue") } ] @@ -286,14 +286,6 @@ export const dynamicRoutes: RouteRecordRaw[] = [ } } ] - }, - { - path: "/:pathMatch(.*)*", // Must put the 'ErrorPage' route at the end, 必须将 'ErrorPage' 路由放在最后 - redirect: "/404", - name: "ErrorPage", - meta: { - hidden: true - } } ]