diff --git a/src/router/constant.ts b/src/router/constant.ts index eebae6dae..d0850108a 100644 --- a/src/router/constant.ts +++ b/src/router/constant.ts @@ -4,6 +4,8 @@ export const PARENT_LAYOUT_NAME = 'ParentLayout' export const PAGE_NOT_FOUND_NAME = 'PageNotFound' +export const PAGE_NOT_FOUND_MATCH_NAME = 'PageNotFoundMatch' + export const EXCEPTION_COMPONENT = () => import('/@/views/sys/exception/Exception.vue') /** diff --git a/src/router/routes/basic.ts b/src/router/routes/basic.ts index e35d1cb02..56491b91c 100644 --- a/src/router/routes/basic.ts +++ b/src/router/routes/basic.ts @@ -1,5 +1,11 @@ import type { AppRouteRecordRaw } from '/@/router/types' -import { REDIRECT_NAME, LAYOUT, EXCEPTION_COMPONENT, PAGE_NOT_FOUND_NAME } from '/@/router/constant' +import { + REDIRECT_NAME, + LAYOUT, + EXCEPTION_COMPONENT, + PAGE_NOT_FOUND_NAME, + PAGE_NOT_FOUND_MATCH_NAME, +} from '/@/router/constant' // 404 on a page export const PAGE_NOT_FOUND_ROUTE: AppRouteRecordRaw = { @@ -14,7 +20,7 @@ export const PAGE_NOT_FOUND_ROUTE: AppRouteRecordRaw = { children: [ { path: '/:path(.*)*', - name: PAGE_NOT_FOUND_NAME, + name: PAGE_NOT_FOUND_MATCH_NAME, component: EXCEPTION_COMPONENT, meta: { title: 'ErrorPage',