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
7
8
|
const ExceptionPage = () => import('/@/views/sys/exception/Exception');
|
vben
authored
|
9
|
const page: AppRouteModule = {
|
vben
authored
|
10
11
|
path: '/page-demo',
name: 'PageDemo',
|
vben
authored
|
12
|
component: LAYOUT,
|
vben
authored
|
13
14
15
|
redirect: '/page-demo/exception',
meta: {
icon: 'mdi:page-next-outline',
|
vben
authored
|
16
|
title: t('routes.demo.page.page'),
|
vben
authored
|
17
18
|
},
children: [
|
vben
authored
|
19
20
|
// =============================form start=============================
{
|
vben
authored
|
21
|
path: 'form',
|
vben
authored
|
22
23
|
name: 'FormPage',
redirect: '/page-demo/form/basic',
|
vben
authored
|
24
|
component: getParentLayout('FormPage'),
|
vben
authored
|
25
|
meta: {
|
vben
authored
|
26
|
title: t('routes.demo.page.form'),
|
vben
authored
|
27
28
29
30
31
32
33
|
},
children: [
{
path: 'basic',
name: 'FormBasicPage',
component: () => import('/@/views/demo/page/form/basic/index.vue'),
meta: {
|
vben
authored
|
34
|
title: t('routes.demo.page.formBasic'),
|
vben
authored
|
35
36
37
38
39
40
41
|
},
},
{
path: 'step',
name: 'FormStepPage',
component: () => import('/@/views/demo/page/form/step/index.vue'),
meta: {
|
vben
authored
|
42
|
title: t('routes.demo.page.formStep'),
|
vben
authored
|
43
44
45
46
47
48
49
|
},
},
{
path: 'high',
name: 'FormHightPage',
component: () => import('/@/views/demo/page/form/high/index.vue'),
meta: {
|
vben
authored
|
50
|
title: t('routes.demo.page.formHigh'),
|
vben
authored
|
51
52
53
54
55
|
},
},
],
},
// =============================form end=============================
|
vben
authored
|
56
57
|
// =============================desc start=============================
{
|
vben
authored
|
58
|
path: 'desc',
|
vben
authored
|
59
|
name: 'DescPage',
|
vben
authored
|
60
|
component: getParentLayout('DescPage'),
|
vben
authored
|
61
62
|
redirect: '/page-demo/desc/basic',
meta: {
|
vben
authored
|
63
|
title: t('routes.demo.page.desc'),
|
vben
authored
|
64
65
66
67
68
69
70
|
},
children: [
{
path: 'basic',
name: 'DescBasicPage',
component: () => import('/@/views/demo/page/desc/basic/index.vue'),
meta: {
|
vben
authored
|
71
|
title: t('routes.demo.page.descBasic'),
|
vben
authored
|
72
73
74
75
76
77
78
|
},
},
{
path: 'high',
name: 'DescHighPage',
component: () => import('/@/views/demo/page/desc/high/index.vue'),
meta: {
|
vben
authored
|
79
|
title: t('routes.demo.page.descHigh'),
|
vben
authored
|
80
81
82
83
84
|
},
},
],
},
// =============================desc end=============================
|
vben
authored
|
85
|
|
vben
authored
|
86
87
|
// =============================result start=============================
{
|
vben
authored
|
88
|
path: 'result',
|
vben
authored
|
89
90
|
name: 'ResultPage',
redirect: '/page-demo/result/success',
|
vben
authored
|
91
92
|
component: getParentLayout('ResultPage'),
|
vben
authored
|
93
|
meta: {
|
vben
authored
|
94
|
title: t('routes.demo.page.result'),
|
vben
authored
|
95
96
97
98
99
100
101
|
},
children: [
{
path: 'success',
name: 'ResultSuccessPage',
component: () => import('/@/views/demo/page/result/success/index.vue'),
meta: {
|
vben
authored
|
102
|
title: t('routes.demo.page.resultSuccess'),
|
vben
authored
|
103
104
105
106
107
108
109
|
},
},
{
path: 'fail',
name: 'ResultFailPage',
component: () => import('/@/views/demo/page/result/fail/index.vue'),
meta: {
|
vben
authored
|
110
|
title: t('routes.demo.page.resultFail'),
|
vben
authored
|
111
112
113
114
115
116
|
},
},
],
},
// =============================result end=============================
|
vben
authored
|
117
118
|
// =============================account start=============================
{
|
vben
authored
|
119
|
path: 'account',
|
vben
authored
|
120
|
name: 'AccountPage',
|
vben
authored
|
121
|
component: getParentLayout('AccountPage'),
|
vben
authored
|
122
123
|
redirect: '/page-demo/account/setting',
meta: {
|
vben
authored
|
124
|
title: t('routes.demo.page.account'),
|
vben
authored
|
125
126
127
128
129
130
131
|
},
children: [
{
path: 'center',
name: 'AccountCenterPage',
component: () => import('/@/views/demo/page/account/center/index.vue'),
meta: {
|
vben
authored
|
132
|
title: t('routes.demo.page.accountCenter'),
|
vben
authored
|
133
134
135
136
137
138
139
|
},
},
{
path: 'setting',
name: 'AccountSettingPage',
component: () => import('/@/views/demo/page/account/setting/index.vue'),
meta: {
|
vben
authored
|
140
|
title: t('routes.demo.page.accountSetting'),
|
vben
authored
|
141
142
143
144
145
|
},
},
],
},
// =============================account end=============================
|
vben
authored
|
146
147
|
// =============================exception start=============================
{
|
vben
authored
|
148
|
path: 'exception',
|
vben
authored
|
149
|
name: 'ExceptionPage',
|
vben
authored
|
150
|
component: getParentLayout('ExceptionPage'),
|
vben
authored
|
151
152
|
redirect: '/page-demo/exception/404',
meta: {
|
vben
authored
|
153
|
title: t('routes.demo.page.exception'),
|
vben
authored
|
154
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
|
},
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
|
197
|
title: t('routes.demo.page.netWorkError'),
|
vben
authored
|
198
199
200
201
202
203
204
205
206
207
|
},
},
{
path: 'not-data',
name: 'NotData',
component: ExceptionPage,
props: {
status: ExceptionEnum.PAGE_NOT_DATA,
},
meta: {
|
vben
authored
|
208
|
title: t('routes.demo.page.notData'),
|
vben
authored
|
209
210
211
212
213
|
},
},
],
},
// =============================exception end=============================
|
|
214
215
|
// =============================list start=============================
{
|
vben
authored
|
216
|
path: 'list',
|
|
217
|
name: 'ListPage',
|
vben
authored
|
218
|
component: getParentLayout('ListPage'),
|
|
219
220
|
redirect: '/page-demo/list/card',
meta: {
|
vben
authored
|
221
|
title: t('routes.demo.page.list'),
|
|
222
223
224
|
},
children: [
{
|
|
225
226
227
228
|
path: 'basic',
name: 'ListBasicPage',
component: () => import('/@/views/demo/page/list/basic/index.vue'),
meta: {
|
vben
authored
|
229
|
title: t('routes.demo.page.listBasic'),
|
|
230
231
232
|
},
},
{
|
|
233
234
235
236
|
path: 'card',
name: 'ListCardPage',
component: () => import('/@/views/demo/page/list/card/index.vue'),
meta: {
|
vben
authored
|
237
|
title: t('routes.demo.page.listCard'),
|
|
238
239
|
},
},
|
|
240
241
242
243
244
|
{
path: 'search',
name: 'ListSearchPage',
component: () => import('/@/views/demo/page/list/search/index.vue'),
meta: {
|
vben
authored
|
245
|
title: t('routes.demo.page.listSearch'),
|
|
246
247
|
},
},
|
|
248
249
250
|
],
},
// =============================list end=============================
|
vben
authored
|
251
|
],
|
vben
authored
|
252
253
254
|
};
export default page;
|