提交 | 用户 | age
|
21e054
|
1 |
import type { AppRouteModule } from '/@/router/types'; |
V |
2 |
|
c303ec
|
3 |
import { getParentLayout, LAYOUT } from '/@/router/constant'; |
21e054
|
4 |
import { ExceptionEnum } from '/@/enums/exceptionEnum'; |
a0b05e
|
5 |
import { t } from '/@/hooks/web/useI18n'; |
21e054
|
6 |
|
581007
|
7 |
const ExceptionPage = () => import('/@/views/sys/exception/Exception.vue'); |
21e054
|
8 |
|
fc4666
|
9 |
const page: AppRouteModule = { |
21e054
|
10 |
path: '/page-demo', |
V |
11 |
name: 'PageDemo', |
c303ec
|
12 |
component: LAYOUT, |
967b28
|
13 |
redirect: '/page-demo/form/basic', |
21e054
|
14 |
meta: { |
37669d
|
15 |
icon: 'ion:aperture-outline', |
a0b05e
|
16 |
title: t('routes.demo.page.page'), |
21e054
|
17 |
}, |
V |
18 |
children: [ |
0b6110
|
19 |
// =============================form start============================= |
V |
20 |
{ |
c303ec
|
21 |
path: 'form', |
0b6110
|
22 |
name: 'FormPage', |
V |
23 |
redirect: '/page-demo/form/basic', |
c303ec
|
24 |
component: getParentLayout('FormPage'), |
0b6110
|
25 |
meta: { |
a0b05e
|
26 |
title: t('routes.demo.page.form'), |
0b6110
|
27 |
}, |
V |
28 |
children: [ |
|
29 |
{ |
|
30 |
path: 'basic', |
|
31 |
name: 'FormBasicPage', |
|
32 |
component: () => import('/@/views/demo/page/form/basic/index.vue'), |
|
33 |
meta: { |
a0b05e
|
34 |
title: t('routes.demo.page.formBasic'), |
0b6110
|
35 |
}, |
V |
36 |
}, |
|
37 |
{ |
|
38 |
path: 'step', |
|
39 |
name: 'FormStepPage', |
|
40 |
component: () => import('/@/views/demo/page/form/step/index.vue'), |
|
41 |
meta: { |
a0b05e
|
42 |
title: t('routes.demo.page.formStep'), |
0b6110
|
43 |
}, |
V |
44 |
}, |
|
45 |
{ |
|
46 |
path: 'high', |
|
47 |
name: 'FormHightPage', |
|
48 |
component: () => import('/@/views/demo/page/form/high/index.vue'), |
|
49 |
meta: { |
a0b05e
|
50 |
title: t('routes.demo.page.formHigh'), |
0b6110
|
51 |
}, |
V |
52 |
}, |
|
53 |
], |
|
54 |
}, |
|
55 |
// =============================form end============================= |
7a0003
|
56 |
// =============================desc start============================= |
V |
57 |
{ |
c303ec
|
58 |
path: 'desc', |
7a0003
|
59 |
name: 'DescPage', |
c303ec
|
60 |
component: getParentLayout('DescPage'), |
7a0003
|
61 |
redirect: '/page-demo/desc/basic', |
V |
62 |
meta: { |
a0b05e
|
63 |
title: t('routes.demo.page.desc'), |
7a0003
|
64 |
}, |
V |
65 |
children: [ |
|
66 |
{ |
|
67 |
path: 'basic', |
|
68 |
name: 'DescBasicPage', |
|
69 |
component: () => import('/@/views/demo/page/desc/basic/index.vue'), |
|
70 |
meta: { |
a0b05e
|
71 |
title: t('routes.demo.page.descBasic'), |
7a0003
|
72 |
}, |
V |
73 |
}, |
|
74 |
{ |
|
75 |
path: 'high', |
|
76 |
name: 'DescHighPage', |
|
77 |
component: () => import('/@/views/demo/page/desc/high/index.vue'), |
|
78 |
meta: { |
a0b05e
|
79 |
title: t('routes.demo.page.descHigh'), |
7a0003
|
80 |
}, |
V |
81 |
}, |
|
82 |
], |
|
83 |
}, |
|
84 |
// =============================desc end============================= |
0b6110
|
85 |
|
21e054
|
86 |
// =============================result start============================= |
V |
87 |
{ |
c303ec
|
88 |
path: 'result', |
21e054
|
89 |
name: 'ResultPage', |
V |
90 |
redirect: '/page-demo/result/success', |
c303ec
|
91 |
component: getParentLayout('ResultPage'), |
V |
92 |
|
21e054
|
93 |
meta: { |
a0b05e
|
94 |
title: t('routes.demo.page.result'), |
21e054
|
95 |
}, |
V |
96 |
children: [ |
|
97 |
{ |
|
98 |
path: 'success', |
|
99 |
name: 'ResultSuccessPage', |
|
100 |
component: () => import('/@/views/demo/page/result/success/index.vue'), |
|
101 |
meta: { |
a0b05e
|
102 |
title: t('routes.demo.page.resultSuccess'), |
21e054
|
103 |
}, |
V |
104 |
}, |
|
105 |
{ |
|
106 |
path: 'fail', |
|
107 |
name: 'ResultFailPage', |
|
108 |
component: () => import('/@/views/demo/page/result/fail/index.vue'), |
|
109 |
meta: { |
a0b05e
|
110 |
title: t('routes.demo.page.resultFail'), |
21e054
|
111 |
}, |
V |
112 |
}, |
|
113 |
], |
|
114 |
}, |
|
115 |
// =============================result end============================= |
|
116 |
|
7a0003
|
117 |
// =============================account start============================= |
V |
118 |
{ |
c303ec
|
119 |
path: 'account', |
7a0003
|
120 |
name: 'AccountPage', |
c303ec
|
121 |
component: getParentLayout('AccountPage'), |
7a0003
|
122 |
redirect: '/page-demo/account/setting', |
V |
123 |
meta: { |
a0b05e
|
124 |
title: t('routes.demo.page.account'), |
7a0003
|
125 |
}, |
V |
126 |
children: [ |
|
127 |
{ |
|
128 |
path: 'center', |
|
129 |
name: 'AccountCenterPage', |
|
130 |
component: () => import('/@/views/demo/page/account/center/index.vue'), |
|
131 |
meta: { |
a0b05e
|
132 |
title: t('routes.demo.page.accountCenter'), |
7a0003
|
133 |
}, |
V |
134 |
}, |
|
135 |
{ |
|
136 |
path: 'setting', |
|
137 |
name: 'AccountSettingPage', |
|
138 |
component: () => import('/@/views/demo/page/account/setting/index.vue'), |
|
139 |
meta: { |
a0b05e
|
140 |
title: t('routes.demo.page.accountSetting'), |
7a0003
|
141 |
}, |
V |
142 |
}, |
|
143 |
], |
|
144 |
}, |
|
145 |
// =============================account end============================= |
21e054
|
146 |
// =============================exception start============================= |
V |
147 |
{ |
c303ec
|
148 |
path: 'exception', |
21e054
|
149 |
name: 'ExceptionPage', |
c303ec
|
150 |
component: getParentLayout('ExceptionPage'), |
21e054
|
151 |
redirect: '/page-demo/exception/404', |
V |
152 |
meta: { |
a0b05e
|
153 |
title: t('routes.demo.page.exception'), |
21e054
|
154 |
}, |
V |
155 |
children: [ |
|
156 |
{ |
|
157 |
path: '403', |
|
158 |
name: 'PageNotAccess', |
|
159 |
component: ExceptionPage, |
|
160 |
props: { |
|
161 |
status: ExceptionEnum.PAGE_NOT_ACCESS, |
|
162 |
}, |
|
163 |
meta: { |
|
164 |
title: '403', |
|
165 |
}, |
|
166 |
}, |
|
167 |
{ |
|
168 |
path: '404', |
|
169 |
name: 'PageNotFound', |
|
170 |
component: ExceptionPage, |
|
171 |
props: { |
|
172 |
status: ExceptionEnum.PAGE_NOT_FOUND, |
|
173 |
}, |
|
174 |
meta: { |
|
175 |
title: '404', |
|
176 |
}, |
|
177 |
}, |
|
178 |
{ |
|
179 |
path: '500', |
|
180 |
name: 'ServiceError', |
|
181 |
component: ExceptionPage, |
|
182 |
props: { |
|
183 |
status: ExceptionEnum.ERROR, |
|
184 |
}, |
|
185 |
meta: { |
|
186 |
title: '500', |
|
187 |
}, |
|
188 |
}, |
|
189 |
{ |
|
190 |
path: 'net-work-error', |
|
191 |
name: 'NetWorkError', |
|
192 |
component: ExceptionPage, |
|
193 |
props: { |
|
194 |
status: ExceptionEnum.NET_WORK_ERROR, |
|
195 |
}, |
|
196 |
meta: { |
a0b05e
|
197 |
title: t('routes.demo.page.netWorkError'), |
21e054
|
198 |
}, |
V |
199 |
}, |
|
200 |
{ |
|
201 |
path: 'not-data', |
|
202 |
name: 'NotData', |
|
203 |
component: ExceptionPage, |
|
204 |
props: { |
|
205 |
status: ExceptionEnum.PAGE_NOT_DATA, |
|
206 |
}, |
|
207 |
meta: { |
a0b05e
|
208 |
title: t('routes.demo.page.notData'), |
21e054
|
209 |
}, |
V |
210 |
}, |
|
211 |
], |
|
212 |
}, |
|
213 |
// =============================exception end============================= |
3a132f
|
214 |
// =============================list start============================= |
陈 |
215 |
{ |
c303ec
|
216 |
path: 'list', |
3a132f
|
217 |
name: 'ListPage', |
c303ec
|
218 |
component: getParentLayout('ListPage'), |
3a132f
|
219 |
redirect: '/page-demo/list/card', |
陈 |
220 |
meta: { |
a0b05e
|
221 |
title: t('routes.demo.page.list'), |
3a132f
|
222 |
}, |
陈 |
223 |
children: [ |
|
224 |
{ |
2f75a9
|
225 |
path: 'basic', |
陈 |
226 |
name: 'ListBasicPage', |
|
227 |
component: () => import('/@/views/demo/page/list/basic/index.vue'), |
|
228 |
meta: { |
a0b05e
|
229 |
title: t('routes.demo.page.listBasic'), |
2f75a9
|
230 |
}, |
陈 |
231 |
}, |
|
232 |
{ |
3a132f
|
233 |
path: 'card', |
陈 |
234 |
name: 'ListCardPage', |
|
235 |
component: () => import('/@/views/demo/page/list/card/index.vue'), |
|
236 |
meta: { |
a0b05e
|
237 |
title: t('routes.demo.page.listCard'), |
3a132f
|
238 |
}, |
陈 |
239 |
}, |
4cb378
|
240 |
{ |
陈 |
241 |
path: 'search', |
|
242 |
name: 'ListSearchPage', |
|
243 |
component: () => import('/@/views/demo/page/list/search/index.vue'), |
|
244 |
meta: { |
a0b05e
|
245 |
title: t('routes.demo.page.listSearch'), |
4cb378
|
246 |
}, |
陈 |
247 |
}, |
3a132f
|
248 |
], |
陈 |
249 |
}, |
|
250 |
// =============================list end============================= |
21e054
|
251 |
], |
fc4666
|
252 |
}; |
V |
253 |
|
|
254 |
export default page; |