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