王少腾
2 months ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with
10 additions and
2 deletions
-
src/router/constant.ts
-
src/router/routes/basic.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') |
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
@ -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', |
|
|
|
|