提交 | 用户 | age
|
2f6253
|
1 |
import type { AppRouteRecordRaw } from '/@/router/types'; |
f4621c
|
2 |
import ParentLayout from '/@/layouts/page/ParentView.vue'; |
2f6253
|
3 |
|
陈 |
4 |
const EXCEPTION_COMPONENT = () => import('../views/sys/exception/Exception'); |
|
5 |
|
|
6 |
/** |
|
7 |
* @description: default layout |
|
8 |
*/ |
c303ec
|
9 |
export const LAYOUT = () => import('/@/layouts/default/index'); |
V |
10 |
|
|
11 |
/** |
|
12 |
* @description: page-layout |
|
13 |
*/ |
|
14 |
export const getParentLayout = (name: string) => { |
|
15 |
return () => |
|
16 |
new Promise((resolve) => { |
|
17 |
resolve({ |
|
18 |
...ParentLayout, |
|
19 |
name, |
|
20 |
}); |
|
21 |
}); |
|
22 |
}; |
2f6253
|
23 |
|
陈 |
24 |
// 404 on a page |
|
25 |
export const PAGE_NOT_FOUND_ROUTE: AppRouteRecordRaw = { |
|
26 |
path: '/:path(.*)*', |
|
27 |
name: 'ErrorPage', |
59ad82
|
28 |
component: LAYOUT, |
2f6253
|
29 |
meta: { |
陈 |
30 |
title: 'ErrorPage', |
|
31 |
hideBreadcrumb: true, |
|
32 |
}, |
59ad82
|
33 |
children: [ |
V |
34 |
{ |
74e62c
|
35 |
path: '/:path(.*)*', |
59ad82
|
36 |
name: 'ErrorPage', |
V |
37 |
component: EXCEPTION_COMPONENT, |
|
38 |
meta: { |
|
39 |
title: 'ErrorPage', |
|
40 |
hideBreadcrumb: true, |
|
41 |
}, |
|
42 |
}, |
|
43 |
], |
2f6253
|
44 |
}; |
e23336
|
45 |
|
c303ec
|
46 |
export const REDIRECT_NAME = 'Redirect'; |
V |
47 |
|
2f6253
|
48 |
export const REDIRECT_ROUTE: AppRouteRecordRaw = { |
c303ec
|
49 |
path: '/redirect', |
V |
50 |
name: REDIRECT_NAME, |
|
51 |
component: LAYOUT, |
2f6253
|
52 |
meta: { |
c303ec
|
53 |
title: REDIRECT_NAME, |
2f6253
|
54 |
hideBreadcrumb: true, |
陈 |
55 |
}, |
c303ec
|
56 |
children: [ |
V |
57 |
{ |
|
58 |
path: '/redirect/:path(.*)', |
|
59 |
name: REDIRECT_NAME, |
|
60 |
component: () => import('/@/views/sys/redirect/index.vue'), |
|
61 |
meta: { |
|
62 |
title: REDIRECT_NAME, |
|
63 |
hideBreadcrumb: true, |
|
64 |
}, |
|
65 |
}, |
|
66 |
], |
2f6253
|
67 |
}; |