@@ -4,11 +4,10 @@ import { bxAnaalyse } from '@/core/icons'
44
55const RouteView = {
66 name : 'RouteView' ,
7- render : ( h ) => h ( 'router-view' )
7+ render : h => h ( 'router-view' )
88}
99
1010export const asyncRouterMap = [
11-
1211 {
1312 path : '/' ,
1413 name : 'index' ,
@@ -22,13 +21,13 @@ export const asyncRouterMap = [
2221 name : 'dashboard' ,
2322 redirect : '/dashboard/workplace' ,
2423 component : RouteView ,
25- meta : { title : 'menu.dashboard' , keepAlive : true , icon : bxAnaalyse , permission : [ 'dashboard' ] } ,
24+ meta : { title : 'menu.dashboard' , keepAlive : true , icon : bxAnaalyse , permission : [ 'dashboard' ] } ,
2625 children : [
2726 {
2827 path : '/dashboard/analysis/:pageNo([1-9]\\d*)?' ,
2928 name : 'Analysis' ,
3029 component : ( ) => import ( '@/views/dashboard/Analysis' ) ,
31- meta : { title : 'menu.dashboard.analysis' , keepAlive : false , permission : [ 'dashboard' ] }
30+ meta : { title : 'menu.dashboard.analysis' , keepAlive : false , permission : [ 'dashboard' ] }
3231 } ,
3332 // 外部链接
3433 {
@@ -40,7 +39,7 @@ export const asyncRouterMap = [
4039 path : '/dashboard/workplace' ,
4140 name : 'Workplace' ,
4241 component : ( ) => import ( '@/views/dashboard/Workplace' ) ,
43- meta : { title : 'menu.dashboard.workplace' , keepAlive : true , permission : [ 'dashboard' ] }
42+ meta : { title : 'menu.dashboard.workplace' , keepAlive : true , permission : [ 'dashboard' ] }
4443 }
4544 ]
4645 } ,
@@ -49,25 +48,25 @@ export const asyncRouterMap = [
4948 path : '/form' ,
5049 redirect : '/form/base-form' ,
5150 component : RouteView ,
52- meta : { title : 'menu.form' , icon : 'form' , permission : [ 'form' ] } ,
51+ meta : { title : 'menu.form' , icon : 'form' , permission : [ 'form' ] } ,
5352 children : [
5453 {
5554 path : '/form/base-form' ,
5655 name : 'BaseForm' ,
5756 component : ( ) => import ( '@/views/form/basicForm' ) ,
58- meta : { title : 'menu.form.basic-form' , keepAlive : true , permission : [ 'form' ] }
57+ meta : { title : 'menu.form.basic-form' , keepAlive : true , permission : [ 'form' ] }
5958 } ,
6059 {
6160 path : '/form/step-form' ,
6261 name : 'StepForm' ,
6362 component : ( ) => import ( '@/views/form/stepForm/StepForm' ) ,
64- meta : { title : 'menu.form.step-form' , keepAlive : true , permission : [ 'form' ] }
63+ meta : { title : 'menu.form.step-form' , keepAlive : true , permission : [ 'form' ] }
6564 } ,
6665 {
6766 path : '/form/advanced-form' ,
6867 name : 'AdvanceForm' ,
6968 component : ( ) => import ( '@/views/form/advancedForm/AdvancedForm' ) ,
70- meta : { title : 'menu.form.advanced-form' , keepAlive : true , permission : [ 'form' ] }
69+ meta : { title : 'menu.form.advanced-form' , keepAlive : true , permission : [ 'form' ] }
7170 }
7271 ]
7372 } ,
@@ -77,51 +76,51 @@ export const asyncRouterMap = [
7776 name : 'list' ,
7877 component : RouteView ,
7978 redirect : '/list/table-list' ,
80- meta : { title : 'menu.list' , icon : 'table' , permission : [ 'table' ] } ,
79+ meta : { title : 'menu.list' , icon : 'table' , permission : [ 'table' ] } ,
8180 children : [
8281 {
8382 path : '/list/table-list/:pageNo([1-9]\\d*)?' ,
8483 name : 'TableListWrapper' ,
8584 hideChildrenInMenu : true , // 强制显示 MenuItem 而不是 SubMenu
8685 component : ( ) => import ( '@/views/list/TableList' ) ,
87- meta : { title : 'menu.list.table-list' , keepAlive : true , permission : [ 'table' ] }
86+ meta : { title : 'menu.list.table-list' , keepAlive : true , permission : [ 'table' ] }
8887 } ,
8988 {
9089 path : '/list/basic-list' ,
9190 name : 'BasicList' ,
9291 component : ( ) => import ( '@/views/list/BasicList' ) ,
93- meta : { title : 'menu.list.basic-list' , keepAlive : true , permission : [ 'table' ] }
92+ meta : { title : 'menu.list.basic-list' , keepAlive : true , permission : [ 'table' ] }
9493 } ,
9594 {
9695 path : '/list/card' ,
9796 name : 'CardList' ,
9897 component : ( ) => import ( '@/views/list/CardList' ) ,
99- meta : { title : 'menu.list.card-list' , keepAlive : true , permission : [ 'table' ] }
98+ meta : { title : 'menu.list.card-list' , keepAlive : true , permission : [ 'table' ] }
10099 } ,
101100 {
102101 path : '/list/search' ,
103102 name : 'SearchList' ,
104103 component : ( ) => import ( '@/views/list/search/SearchLayout' ) ,
105104 redirect : '/list/search/article' ,
106- meta : { title : 'menu.list.search-list' , keepAlive : true , permission : [ 'table' ] } ,
105+ meta : { title : 'menu.list.search-list' , keepAlive : true , permission : [ 'table' ] } ,
107106 children : [
108107 {
109108 path : '/list/search/article' ,
110109 name : 'SearchArticles' ,
111110 component : ( ) => import ( '../views/list/search/Article' ) ,
112- meta : { title : 'menu.list.search-list.articles' , permission : [ 'table' ] }
111+ meta : { title : 'menu.list.search-list.articles' , permission : [ 'table' ] }
113112 } ,
114113 {
115114 path : '/list/search/project' ,
116115 name : 'SearchProjects' ,
117116 component : ( ) => import ( '../views/list/search/Projects' ) ,
118- meta : { title : 'menu.list.search-list.projects' , permission : [ 'table' ] }
117+ meta : { title : 'menu.list.search-list.projects' , permission : [ 'table' ] }
119118 } ,
120119 {
121120 path : '/list/search/application' ,
122121 name : 'SearchApplications' ,
123122 component : ( ) => import ( '../views/list/search/Applications' ) ,
124- meta : { title : 'menu.list.search-list.applications' , permission : [ 'table' ] }
123+ meta : { title : 'menu.list.search-list.applications' , permission : [ 'table' ] }
125124 }
126125 ]
127126 }
@@ -134,19 +133,19 @@ export const asyncRouterMap = [
134133 name : 'profile' ,
135134 component : RouteView ,
136135 redirect : '/profile/basic' ,
137- meta : { title : 'menu.profile' , icon : 'profile' , permission : [ 'profile' ] } ,
136+ meta : { title : 'menu.profile' , icon : 'profile' , permission : [ 'profile' ] } ,
138137 children : [
139138 {
140139 path : '/profile/basic' ,
141140 name : 'ProfileBasic' ,
142141 component : ( ) => import ( '@/views/profile/basic' ) ,
143- meta : { title : 'menu.profile.basic' , permission : [ 'profile' ] }
142+ meta : { title : 'menu.profile.basic' , permission : [ 'profile' ] }
144143 } ,
145144 {
146145 path : '/profile/advanced' ,
147146 name : 'ProfileAdvanced' ,
148147 component : ( ) => import ( '@/views/profile/advanced/Advanced' ) ,
149- meta : { title : 'menu.profile.advanced' , permission : [ 'profile' ] }
148+ meta : { title : 'menu.profile.advanced' , permission : [ 'profile' ] }
150149 }
151150 ]
152151 } ,
@@ -157,19 +156,19 @@ export const asyncRouterMap = [
157156 name : 'result' ,
158157 component : RouteView ,
159158 redirect : '/result/success' ,
160- meta : { title : 'menu.result' , icon : 'check-circle-o' , permission : [ 'result' ] } ,
159+ meta : { title : 'menu.result' , icon : 'check-circle-o' , permission : [ 'result' ] } ,
161160 children : [
162161 {
163162 path : '/result/success' ,
164163 name : 'ResultSuccess' ,
165164 component : ( ) => import ( /* webpackChunkName: "result" */ '@/views/result/Success' ) ,
166- meta : { title : 'menu.result.success' , keepAlive : false , hiddenHeaderContent : true , permission : [ 'result' ] }
165+ meta : { title : 'menu.result.success' , keepAlive : false , hiddenHeaderContent : true , permission : [ 'result' ] }
167166 } ,
168167 {
169168 path : '/result/fail' ,
170169 name : 'ResultFail' ,
171170 component : ( ) => import ( /* webpackChunkName: "result" */ '@/views/result/Error' ) ,
172- meta : { title : 'menu.result.fail' , keepAlive : false , hiddenHeaderContent : true , permission : [ 'result' ] }
171+ meta : { title : 'menu.result.fail' , keepAlive : false , hiddenHeaderContent : true , permission : [ 'result' ] }
173172 }
174173 ]
175174 } ,
@@ -180,25 +179,25 @@ export const asyncRouterMap = [
180179 name : 'exception' ,
181180 component : RouteView ,
182181 redirect : '/exception/403' ,
183- meta : { title : 'menu.exception' , icon : 'warning' , permission : [ 'exception' ] } ,
182+ meta : { title : 'menu.exception' , icon : 'warning' , permission : [ 'exception' ] } ,
184183 children : [
185184 {
186- path : '/exception/403' ,
185+ path : '/exception/403' ,
187186 name : 'Exception403' ,
188187 component : ( ) => import ( /* webpackChunkName: "fail" */ '@/views/exception/403' ) ,
189- meta : { title : 'menu.exception.not-permission' , permission : [ 'exception' ] }
188+ meta : { title : 'menu.exception.not-permission' , permission : [ 'exception' ] }
190189 } ,
191190 {
192191 path : '/exception/404' ,
193192 name : 'Exception404' ,
194193 component : ( ) => import ( /* webpackChunkName: "fail" */ '@/views/exception/404' ) ,
195- meta : { title : 'menu.exception.not-find' , permission : [ 'exception' ] }
194+ meta : { title : 'menu.exception.not-find' , permission : [ 'exception' ] }
196195 } ,
197196 {
198197 path : '/exception/500' ,
199198 name : 'Exception500' ,
200199 component : ( ) => import ( /* webpackChunkName: "fail" */ '@/views/exception/500' ) ,
201- meta : { title : 'menu.exception.server-error' , permission : [ 'exception' ] }
200+ meta : { title : 'menu.exception.server-error' , permission : [ 'exception' ] }
202201 }
203202 ]
204203 } ,
@@ -209,51 +208,61 @@ export const asyncRouterMap = [
209208 component : RouteView ,
210209 redirect : '/account/center' ,
211210 name : 'account' ,
212- meta : { title : 'menu.account' , icon : 'user' , keepAlive : true , permission : [ 'user' ] } ,
211+ meta : { title : 'menu.account' , icon : 'user' , keepAlive : true , permission : [ 'user' ] } ,
213212 children : [
214- {
213+ {
215214 path : '/account/center' ,
216215 name : 'center' ,
217216 component : ( ) => import ( '@/views/account/center' ) ,
218- meta : { title : 'menu.account.center' , keepAlive : true , permission : [ 'user' ] }
217+ meta : { title : 'menu.account.center' , keepAlive : true , permission : [ 'user' ] }
219218 } ,
220219 {
221220 path : '/account/settings' ,
222221 name : 'settings' ,
223222 component : ( ) => import ( '@/views/account/settings/Index' ) ,
224- meta : { title : 'menu.account.settings' , hideHeader : true , permission : [ 'user' ] } ,
223+ meta : { title : 'menu.account.settings' , hideHeader : true , permission : [ 'user' ] } ,
225224 redirect : '/account/settings/basic' ,
226225 hideChildrenInMenu : true ,
227226 children : [
228227 {
229228 path : '/account/settings/basic' ,
230229 name : 'BasicSettings' ,
231230 component : ( ) => import ( '@/views/account/settings/BasicSetting' ) ,
232- meta : { title : 'account.settings.menuMap.basic' , hidden : true , permission : [ 'user' ] }
231+ meta : { title : 'account.settings.menuMap.basic' , hidden : true , permission : [ 'user' ] }
233232 } ,
234233 {
235234 path : '/account/settings/security' ,
236235 name : 'SecuritySettings' ,
237236 component : ( ) => import ( '@/views/account/settings/Security' ) ,
238- meta : { title : '安全设置' , hidden : true , keepAlive : true , permission : [ 'user' ] }
237+ meta : {
238+ title : 'account.settings.menuMap.security' ,
239+ hidden : true ,
240+ keepAlive : true ,
241+ permission : [ 'user' ]
242+ }
239243 } ,
240244 {
241245 path : '/account/settings/custom' ,
242246 name : 'CustomSettings' ,
243247 component : ( ) => import ( '@/views/account/settings/Custom' ) ,
244- meta : { title : '个性化设置 ' , hidden : true , keepAlive : true , permission : [ 'user' ] }
248+ meta : { title : 'account.settings.menuMap.custom ' , hidden : true , keepAlive : true , permission : [ 'user' ] }
245249 } ,
246250 {
247251 path : '/account/settings/binding' ,
248252 name : 'BindingSettings' ,
249253 component : ( ) => import ( '@/views/account/settings/Binding' ) ,
250- meta : { title : '账户绑定 ' , hidden : true , keepAlive : true , permission : [ 'user' ] }
254+ meta : { title : 'account.settings.menuMap.binding ' , hidden : true , keepAlive : true , permission : [ 'user' ] }
251255 } ,
252256 {
253257 path : '/account/settings/notification' ,
254258 name : 'NotificationSettings' ,
255259 component : ( ) => import ( '@/views/account/settings/Notification' ) ,
256- meta : { title : '新消息通知' , hidden : true , keepAlive : true , permission : [ 'user' ] }
260+ meta : {
261+ title : 'account.settings.menuMap.notification' ,
262+ hidden : true ,
263+ keepAlive : true ,
264+ permission : [ 'user' ]
265+ }
257266 }
258267 ]
259268 }
@@ -325,7 +334,9 @@ export const asyncRouterMap = [
325334 ]
326335 } ,
327336 {
328- path : '*' , redirect : '/404' , hidden : true
337+ path : '*' ,
338+ redirect : '/404' ,
339+ hidden : true
329340 }
330341]
331342
@@ -367,5 +378,4 @@ export const constantRouterMap = [
367378 path : '/404' ,
368379 component : ( ) => import ( /* webpackChunkName: "fail" */ '@/views/exception/404' )
369380 }
370-
371381]
0 commit comments