@@ -54,66 +54,57 @@ const Theme = resolve => require(['../views/theme/index'], resolve);
5454const DynamicTable = resolve => require ( [ '../views/example/dynamictable' ] , resolve ) ;
5555const Table = resolve => require ( [ '../views/example/table' ] , resolve ) ;
5656const Form1 = resolve => require ( [ '../views/example/form1' ] , resolve ) ;
57- const Form2 = resolve => require ( [ '../views/example/form2' ] , resolve ) ;
57+ // const Form2 = resolve => require(['../views/example/form2'], resolve);
5858
5959/* permission */
6060const Permission = resolve => require ( [ '../views/permission/index' ] , resolve ) ;
6161
62- /* admin*/
63- // const AdminCreateUser = resolve => require(['../views/admin/createUser'], resolve);
64- // const QuicklyCreateUser = resolve => require(['../views/admin/quicklycreate'], resolve);
65- // const UserProfile = resolve => require(['../views/admin/profile'], resolve);
66- // const UsersList = resolve => require(['../views/admin/usersList'], resolve);
67-
68-
69-
7062
7163Vue . use ( Router ) ;
7264
7365export default new Router ( {
74- // mode: 'history', //后端支持可开
75- scrollBehavior : ( ) => ( { y : 0 } ) ,
76- routes : [
66+ // mode: 'history', //后端支持可开
67+ scrollBehavior : ( ) => ( { y : 0 } ) ,
68+ routes : [
7769 { path : '/login' , component : Login , hidden : true } ,
7870 { path : '/authredirect' , component : authRedirect , hidden : true } ,
7971 { path : '/sendpwd' , component : sendPWD , hidden : true } ,
8072 { path : '/reset' , component : reset , hidden : true } ,
8173 { path : '/404' , component : Err404 , hidden : true } ,
8274 { path : '/401' , component : Err401 , hidden : true } , {
83- path : '/' ,
84- component : Layout ,
85- redirect : '/dashboard' ,
86- name : '首页' ,
87- hidden : true ,
88- children : [ { path : 'dashboard' , component : dashboard } ]
75+ path : '/' ,
76+ component : Layout ,
77+ redirect : '/dashboard' ,
78+ name : '首页' ,
79+ hidden : true ,
80+ children : [ { path : 'dashboard' , component : dashboard } ]
8981 } , {
90- path : '/introduction' ,
91- component : Layout ,
92- redirect : '/introduction/index' ,
93- name : '简述' ,
94- icon : 'xinrenzhinan' ,
95- noDropdown : true ,
96- children : [
82+ path : '/introduction' ,
83+ component : Layout ,
84+ redirect : '/introduction/index' ,
85+ icon : 'xinrenzhinan' ,
86+ noDropdown : true ,
87+ children : [
9788 { path : 'index' , component : Introduction , name : '简述' }
98- ]
89+ ]
9990 } , {
100- path : '/permission' ,
101- component : Layout ,
102- redirect : '/permission/index' ,
103- name : '权限测试' ,
104- icon : 'quanxian' ,
105- meta : { role : [ 'admin' ] } ,
106- noDropdown : true ,
107- children : [
91+ path : '/permission' ,
92+ component : Layout ,
93+ redirect : '/permission/index' ,
94+ name : '权限测试' ,
95+ icon : 'quanxian' ,
96+ meta : { role : [ 'admin' ] } ,
97+ noDropdown : true ,
98+ children : [
10899 { path : 'index' , component : Permission , name : '权限测试页' , meta : { role : [ 'admin' ] } }
109- ]
100+ ]
110101 } , {
111- path : '/components' ,
112- component : Layout ,
113- redirect : '/components/index' ,
114- name : '组件' ,
115- icon : 'zujian' ,
116- children : [
102+ path : '/components' ,
103+ component : Layout ,
104+ redirect : '/components/index' ,
105+ name : '组件' ,
106+ icon : 'zujian' ,
107+ children : [
117108 { path : 'index' , component : componentsIndex , name : '介绍 ' } ,
118109 { path : 'tinymce' , component : Tinymce , name : '富文本编辑器' } ,
119110 { path : 'markdown' , component : Markdown , name : 'Markdown' } ,
@@ -125,72 +116,72 @@ export default new Router({
125116 { path : 'sticky' , component : Sticky , name : 'Sticky' } ,
126117 { path : 'countto' , component : CountTo , name : 'CountTo' } ,
127118 { path : 'mixin' , component : Mixin , name : '小组件' }
128- ]
119+ ]
129120 } , {
130- path : '/charts' ,
131- component : Layout ,
132- redirect : '/charts/index' ,
133- name : '图表' ,
134- icon : 'tubiaoleixingzhengchang' ,
135- children : [
121+ path : '/charts' ,
122+ component : Layout ,
123+ redirect : '/charts/index' ,
124+ name : '图表' ,
125+ icon : 'tubiaoleixingzhengchang' ,
126+ children : [
136127 { path : 'index' , component : chartIndex , name : '介绍' } ,
137128 { path : 'keyboard' , component : KeyboardChart , name : '键盘图表' } ,
138129 { path : 'keyboard2' , component : KeyboardChart2 , name : '键盘图表2' } ,
139130 { path : 'line' , component : LineMarker , name : '折线图' } ,
140131 { path : 'mixchart' , component : MixChart , name : '混合图表' }
141- ]
132+ ]
142133 } , {
143- path : '/errorpage' ,
144- component : Layout ,
145- redirect : 'noredirect' ,
146- name : '错误页面' ,
147- icon : '404' ,
148- children : [
134+ path : '/errorpage' ,
135+ component : Layout ,
136+ redirect : 'noredirect' ,
137+ name : '错误页面' ,
138+ icon : '404' ,
139+ children : [
149140 { path : '401' , component : Err401 , name : '401' } ,
150141 { path : '404' , component : Err404 , name : '404' }
151- ]
142+ ]
152143 } , {
153- path : '/errlog' ,
154- component : Layout ,
155- redirect : 'noredirect' ,
156- name : 'errlog' ,
157- icon : 'bug' ,
158- noDropdown : true ,
159- children : [
144+ path : '/errlog' ,
145+ component : Layout ,
146+ redirect : 'noredirect' ,
147+ name : 'errlog' ,
148+ icon : 'bug' ,
149+ noDropdown : true ,
150+ children : [
160151 { path : 'log' , component : ErrorLog , name : '错误日志' }
161- ]
152+ ]
162153 } , {
163- path : '/excel' ,
164- component : Layout ,
165- redirect : 'noredirect' ,
166- name : 'excel' ,
167- icon : 'EXCEL' ,
168- noDropdown : true ,
169- children : [
154+ path : '/excel' ,
155+ component : Layout ,
156+ redirect : 'noredirect' ,
157+ name : 'excel' ,
158+ icon : 'EXCEL' ,
159+ noDropdown : true ,
160+ children : [
170161 { path : 'download' , component : ExcelDownload , name : '导出excel' }
171- ]
162+ ]
172163 } , {
173- path : '/theme' ,
174- component : Layout ,
175- redirect : 'noredirect' ,
176- name : 'theme' ,
177- icon : 'theme' ,
178- noDropdown : true ,
179- children : [
164+ path : '/theme' ,
165+ component : Layout ,
166+ redirect : 'noredirect' ,
167+ name : 'theme' ,
168+ icon : 'theme' ,
169+ noDropdown : true ,
170+ children : [
180171 { path : 'index' , component : Theme , name : '换肤' }
181- ]
172+ ]
182173 } , {
183- path : '/example' ,
184- component : Layout ,
185- redirect : 'noredirect' ,
186- name : '综合实例' ,
187- icon : 'zonghe' ,
188- children : [
174+ path : '/example' ,
175+ component : Layout ,
176+ redirect : 'noredirect' ,
177+ name : '综合实例' ,
178+ icon : 'zonghe' ,
179+ children : [
189180 { path : 'dynamictable' , component : DynamicTable , name : '动态table' } ,
190181 { path : 'table' , component : Table , name : '综合table' } ,
191182 { path : 'form1' , component : Form1 , name : '综合form1' }
192183 // { path: 'form2', component: Form2, name: '综合form2' }
193- ]
184+ ]
194185 } ,
195186 // {
196187 // path: '/admin',
@@ -206,5 +197,5 @@ export default new Router({
206197 // ]
207198 // },
208199 { path : '*' , redirect : '/404' , hidden : true }
209- ]
200+ ]
210201} ) ;
0 commit comments