@@ -26,11 +26,11 @@ const Tinymce = resolve => require(['../views/components/tinymce'], resolve);
2626const Markdown = resolve => require ( [ '../views/components/markdown' ] , resolve ) ;
2727const JsonEditor = resolve => require ( [ '../views/components/jsoneditor' ] , resolve ) ;
2828const DndList = resolve => require ( [ '../views/components/dndlist' ] , resolve ) ;
29- const AvatarUpload = resolve => require ( [ '../views/components/avatarupload ' ] , resolve ) ;
29+ const AvatarUpload = resolve => require ( [ '../views/components/avatarUpload ' ] , resolve ) ;
3030const Dropzone = resolve => require ( [ '../views/components/dropzone' ] , resolve ) ;
3131const Sticky = resolve => require ( [ '../views/components/sticky' ] , resolve ) ;
3232const SplitPane = resolve => require ( [ '../views/components/splitpane' ] , resolve ) ;
33- const CountTo = resolve => require ( [ '../views/components/countto ' ] , resolve ) ;
33+ const CountTo = resolve => require ( [ '../views/components/countTo ' ] , resolve ) ;
3434const Mixin = resolve => require ( [ '../views/components/mixin' ] , resolve ) ;
3535
3636
@@ -71,150 +71,140 @@ const Permission = resolve => require(['../views/permission/index'], resolve);
7171Vue . use ( Router ) ;
7272
7373export default new Router ( {
74- // mode: 'history', //后端支持可开
75- scrollBehavior : ( ) => ( { y : 0 } ) ,
76- routes : [
74+ // mode: 'history', //后端支持可开
75+ scrollBehavior : ( ) => ( { y : 0 } ) ,
76+ routes : [
7777 { path : '/login' , component : Login , hidden : true } ,
7878 { path : '/authredirect' , component : authRedirect , hidden : true } ,
7979 { path : '/sendpwd' , component : sendPWD , hidden : true } ,
8080 { path : '/reset' , component : reset , hidden : true } ,
8181 { path : '/404' , component : Err404 , hidden : true } ,
82- { path : '/401' , component : Err401 , hidden : true } ,
83- {
84- path : '/' ,
85- component : Layout ,
86- redirect : '/dashboard' ,
87- name : '首页' ,
88- hidden : true ,
89- children : [ { path : 'dashboard' , component : dashboard } ]
90- } ,
91- {
92- path : '/introduction' ,
93- component : Layout ,
94- redirect : '/introduction/index' ,
95- name : '简述' ,
96- icon : 'xinrenzhinan' ,
97- noDropdown : true ,
98- children : [
99- { path : 'index' , component : Introduction , name : '简述' }
100- ]
101- } ,
102- {
103- path : '/permission' ,
104- component : Layout ,
105- redirect : '/permission/index' ,
106- name : '权限测试' ,
107- icon : 'quanxian' ,
108- meta : { role : [ 'admin' ] } ,
109- noDropdown : true ,
110- children : [
111- { path : 'index' , component : Permission , name : '权限测试页' , meta : { role : [ 'admin' ] } }
112- ]
113- } ,
114- {
115- path : '/components' ,
116- component : Layout ,
117- redirect : '/components/index' ,
118- name : '组件' ,
119- icon : 'zujian' ,
120- children : [
121- { path : 'index' , component : componentsIndex , name : '介绍 ' } ,
122- { path : 'tinymce' , component : Tinymce , name : '富文本编辑器' } ,
123- { path : 'markdown' , component : Markdown , name : 'Markdown' } ,
124- { path : 'jsoneditor' , component : JsonEditor , name : 'JSON编辑器' } ,
125- { path : 'dndlist' , component : DndList , name : '列表拖拽' } ,
126- { path : 'splitpane' , component : SplitPane , name : 'SplitPane' } ,
127- { path : 'avatarupload' , component : AvatarUpload , name : '头像上传' } ,
128- { path : 'dropzone' , component : Dropzone , name : 'Dropzone' } ,
129- { path : 'sticky' , component : Sticky , name : 'Sticky' } ,
130- { path : 'countto' , component : CountTo , name : 'CountTo' } ,
131- { path : 'mixin' , component : Mixin , name : '小组件' }
132- ]
133- } ,
134- {
135- path : '/charts' ,
136- component : Layout ,
137- redirect : '/charts/index' ,
138- name : '图表' ,
139- icon : 'tubiaoleixingzhengchang' ,
140- children : [
141- { path : 'index' , component : chartIndex , name : '介绍' } ,
142- { path : 'keyboard' , component : KeyboardChart , name : '键盘图表' } ,
143- { path : 'keyboard2' , component : KeyboardChart2 , name : '键盘图表2' } ,
144- { path : 'line' , component : LineMarker , name : '折线图' } ,
145- { path : 'mixchart' , component : MixChart , name : '混合图表' }
146- ]
147- } ,
148- {
149- path : '/errorpage' ,
150- component : Layout ,
151- redirect : 'noredirect' ,
152- name : '错误页面' ,
153- icon : '404' ,
154- children : [
155- { path : '401' , component : Err401 , name : '401' } ,
156- { path : '404' , component : Err404 , name : '404' }
157- ]
158- } ,
159- {
160- path : '/errlog' ,
161- component : Layout ,
162- redirect : 'noredirect' ,
163- name : 'errlog' ,
164- icon : 'bug' ,
165- noDropdown : true ,
166- children : [
167- { path : 'log' , component : ErrorLog , name : '错误日志' }
168- ]
169- } ,
170- {
171- path : '/excel' ,
172- component : Layout ,
173- redirect : 'noredirect' ,
174- name : 'excel' ,
175- icon : 'EXCEL' ,
176- noDropdown : true ,
177- children : [
178- { path : 'download' , component : ExcelDownload , name : '导出excel' }
179- ]
180- } ,
181- {
182- path : '/theme' ,
183- component : Layout ,
184- redirect : 'noredirect' ,
185- name : 'theme' ,
186- icon : 'theme' ,
187- noDropdown : true ,
188- children : [
189- { path : 'index' , component : Theme , name : '换肤' }
190- ]
191- } ,
192- {
193- path : '/example' ,
194- component : Layout ,
195- redirect : 'noredirect' ,
196- name : '综合实例' ,
197- icon : 'zonghe' ,
198- children : [
199- { path : 'dynamictable' , component : DynamicTable , name : '动态table' } ,
200- { path : 'table' , component : Table , name : '综合table' } ,
201- { path : 'form1' , component : Form1 , name : '综合form1' }
202- // { path: 'form2', component: Form2, name: '综合form2' }
203- ]
204- } ,
205- // {
206- // path: '/admin',
207- // component: Layout,
208- // redirect: 'noredirect',
209- // name: '后台管理',
210- // icon: 'geren1',
211- // children: [
212- // { path: 'createuser', component: AdminCreateUser, name: '管理员', meta: { role: ['admin'] } },
213- // { path: 'list', component: UsersList, name: '后台用户列表', meta: { role: ['super_editor', 'product', 'author_assistant'] } },
214- // { path: 'qicklyCreate', component: QuicklyCreateUser, name: '一键创建账户', meta: { role: ['super_editor', 'gold_editor', 'weex_editor', 'wscn_editor', 'author_assistant', 'product'] } },
215- // { path: 'profile', component: UserProfile, name: '个人' }
216- // ]
217- // },
218- { path : '*' , redirect : '/404' , hidden : true }
219- ]
82+ { 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 } ]
89+ } , {
90+ path : '/introduction' ,
91+ component : Layout ,
92+ redirect : '/introduction/index' ,
93+ name : '简述' ,
94+ icon : 'xinrenzhinan' ,
95+ noDropdown : true ,
96+ children : [
97+ { path : 'index' , component : Introduction , name : '简述' }
98+ ]
99+ } , {
100+ path : '/permission' ,
101+ component : Layout ,
102+ redirect : '/permission/index' ,
103+ name : '权限测试' ,
104+ icon : 'quanxian' ,
105+ meta : { role : [ 'admin' ] } ,
106+ noDropdown : true ,
107+ children : [
108+ { path : 'index' , component : Permission , name : '权限测试页' , meta : { role : [ 'admin' ] } }
109+ ]
110+ } , {
111+ path : '/components' ,
112+ component : Layout ,
113+ redirect : '/components/index' ,
114+ name : '组件' ,
115+ icon : 'zujian' ,
116+ children : [
117+ { path : 'index' , component : componentsIndex , name : '介绍 ' } ,
118+ { path : 'tinymce' , component : Tinymce , name : '富文本编辑器' } ,
119+ { path : 'markdown' , component : Markdown , name : 'Markdown' } ,
120+ { path : 'jsoneditor' , component : JsonEditor , name : 'JSON编辑器' } ,
121+ { path : 'dndlist' , component : DndList , name : '列表拖拽' } ,
122+ { path : 'splitpane' , component : SplitPane , name : 'SplitPane' } ,
123+ { path : 'avatarupload' , component : AvatarUpload , name : '头像上传' } ,
124+ { path : 'dropzone' , component : Dropzone , name : 'Dropzone' } ,
125+ { path : 'sticky' , component : Sticky , name : 'Sticky' } ,
126+ { path : 'countto' , component : CountTo , name : 'CountTo' } ,
127+ { path : 'mixin' , component : Mixin , name : '小组件' }
128+ ]
129+ } , {
130+ path : '/charts' ,
131+ component : Layout ,
132+ redirect : '/charts/index' ,
133+ name : '图表' ,
134+ icon : 'tubiaoleixingzhengchang' ,
135+ children : [
136+ { path : 'index' , component : chartIndex , name : '介绍' } ,
137+ { path : 'keyboard' , component : KeyboardChart , name : '键盘图表' } ,
138+ { path : 'keyboard2' , component : KeyboardChart2 , name : '键盘图表2' } ,
139+ { path : 'line' , component : LineMarker , name : '折线图' } ,
140+ { path : 'mixchart' , component : MixChart , name : '混合图表' }
141+ ]
142+ } , {
143+ path : '/errorpage' ,
144+ component : Layout ,
145+ redirect : 'noredirect' ,
146+ name : '错误页面' ,
147+ icon : '404' ,
148+ children : [
149+ { path : '401' , component : Err401 , name : '401' } ,
150+ { path : '404' , component : Err404 , name : '404' }
151+ ]
152+ } , {
153+ path : '/errlog' ,
154+ component : Layout ,
155+ redirect : 'noredirect' ,
156+ name : 'errlog' ,
157+ icon : 'bug' ,
158+ noDropdown : true ,
159+ children : [
160+ { path : 'log' , component : ErrorLog , name : '错误日志' }
161+ ]
162+ } , {
163+ path : '/excel' ,
164+ component : Layout ,
165+ redirect : 'noredirect' ,
166+ name : 'excel' ,
167+ icon : 'EXCEL' ,
168+ noDropdown : true ,
169+ children : [
170+ { path : 'download' , component : ExcelDownload , name : '导出excel' }
171+ ]
172+ } , {
173+ path : '/theme' ,
174+ component : Layout ,
175+ redirect : 'noredirect' ,
176+ name : 'theme' ,
177+ icon : 'theme' ,
178+ noDropdown : true ,
179+ children : [
180+ { path : 'index' , component : Theme , name : '换肤' }
181+ ]
182+ } , {
183+ path : '/example' ,
184+ component : Layout ,
185+ redirect : 'noredirect' ,
186+ name : '综合实例' ,
187+ icon : 'zonghe' ,
188+ children : [
189+ { path : 'dynamictable' , component : DynamicTable , name : '动态table' } ,
190+ { path : 'table' , component : Table , name : '综合table' } ,
191+ { path : 'form1' , component : Form1 , name : '综合form1' }
192+ // { path: 'form2', component: Form2, name: '综合form2' }
193+ ]
194+ } ,
195+ // {
196+ // path: '/admin',
197+ // component: Layout,
198+ // redirect: 'noredirect',
199+ // name: '后台管理',
200+ // icon: 'geren1',
201+ // children: [
202+ // { path: 'createuser', component: AdminCreateUser, name: '管理员', meta: { role: ['admin'] } },
203+ // { path: 'list', component: UsersList, name: '后台用户列表', meta: { role: ['super_editor', 'product', 'author_assistant'] } },
204+ // { path: 'qicklyCreate', component: QuicklyCreateUser, name: '一键创建账户', meta: { role: ['super_editor', 'gold_editor', 'weex_editor', 'wscn_editor', 'author_assistant', 'product'] } },
205+ // { path: 'profile', component: UserProfile, name: '个人' }
206+ // ]
207+ // },
208+ { path : '*' , redirect : '/404' , hidden : true }
209+ ]
220210} ) ;
0 commit comments