1
1
import Vue from 'vue' ;
2
2
import Router from 'vue-router' ;
3
3
4
- /* layout*/
4
+ /* layout */
5
5
import Layout from '../views/layout/Layout' ;
6
6
7
- // dashboard
8
- const dashboard = resolve => require ( [ '../views/dashboard/index' ] , resolve ) ;
9
-
10
- /* error page*/
11
- const Err404 = resolve => require ( [ '../views/error/404' ] , resolve ) ;
12
- const Err401 = resolve => require ( [ '../views/error/401' ] , resolve ) ;
13
-
14
- /* login*/
7
+ /* login */
15
8
import Login from '../views/login/' ;
16
- import authRedirect from '../views/login/authredirect' ;
17
- import sendPWD from '../views/login/sendpwd' ;
18
- import reset from '../views/login/reset' ;
19
-
20
- /* Introduction*/
21
- const Introduction = resolve => require ( [ '../views/introduction/index' ] , resolve ) ;
22
-
23
- /* components*/
24
- const componentsIndex = resolve => require ( [ '../views/components/index' ] , resolve ) ;
25
- const Tinymce = resolve => require ( [ '../views/components/tinymce' ] , resolve ) ;
26
- const Markdown = resolve => require ( [ '../views/components/markdown' ] , resolve ) ;
27
- const JsonEditor = resolve => require ( [ '../views/components/jsoneditor' ] , resolve ) ;
28
- const DndList = resolve => require ( [ '../views/components/dndlist' ] , resolve ) ;
29
- const AvatarUpload = resolve => require ( [ '../views/components/avatarUpload' ] , resolve ) ;
30
- const Dropzone = resolve => require ( [ '../views/components/dropzone' ] , resolve ) ;
31
- const Sticky = resolve => require ( [ '../views/components/sticky' ] , resolve ) ;
32
- const SplitPane = resolve => require ( [ '../views/components/splitpane' ] , resolve ) ;
33
- const CountTo = resolve => require ( [ '../views/components/countTo' ] , resolve ) ;
34
- const Mixin = resolve => require ( [ '../views/components/mixin' ] , resolve ) ;
35
-
36
-
37
- /* charts*/
38
- const chartIndex = resolve => require ( [ '../views/charts/index' ] , resolve ) ;
39
- const KeyboardChart = resolve => require ( [ '../views/charts/keyboard' ] , resolve ) ;
40
- const KeyboardChart2 = resolve => require ( [ '../views/charts/keyboard2' ] , resolve ) ;
41
- const LineMarker = resolve => require ( [ '../views/charts/line' ] , resolve ) ;
42
- const MixChart = resolve => require ( [ '../views/charts/mixchart' ] , resolve ) ;
43
-
44
- /* error log*/
45
- const ErrorLog = resolve => require ( [ '../views/errlog/index' ] , resolve ) ;
46
-
47
- /* excel*/
48
- const ExcelDownload = resolve => require ( [ '../views/excel/index' ] , resolve ) ;
49
-
50
- /* theme*/
51
- const Theme = resolve => require ( [ '../views/theme/index' ] , resolve ) ;
9
+ const authRedirect = ( ) => import ( '../views/login/authredirect' ) ;
10
+ const sendPWD = ( ) => import ( '../views/login/sendpwd' ) ;
11
+ const reset = ( ) => import ( '../views/login/reset' ) ;
12
+
13
+ /* dashboard */
14
+ const dashboard = ( ) => import ( '../views/dashboard/index' ) ;
15
+
16
+ /* Introduction */
17
+ const Introduction = ( ) => import ( '../views/introduction/index' ) ;
18
+
19
+ /* components */
20
+ const componentsIndex = ( ) => import ( '../views/components/index' ) ;
21
+ const Tinymce = ( ) => import ( '../views/components/tinymce' ) ;
22
+ const Markdown = ( ) => import ( '../views/components/markdown' ) ;
23
+ const JsonEditor = ( ) => import ( '../views/components/jsoneditor' ) ;
24
+ const DndList = ( ) => import ( '../views/components/dndlist' ) ;
25
+ const AvatarUpload = ( ) => import ( '../views/components/avatarUpload' ) ;
26
+ const Dropzone = ( ) => import ( '../views/components/dropzone' ) ;
27
+ const Sticky = ( ) => import ( '../views/components/sticky' ) ;
28
+ const SplitPane = ( ) => import ( '../views/components/splitpane' ) ;
29
+ const CountTo = ( ) => import ( '../views/components/countTo' ) ;
30
+ const Mixin = ( ) => import ( '../views/components/mixin' ) ;
31
+
32
+
33
+ /* charts */
34
+ const chartIndex = ( ) => import ( '../views/charts/index' ) ;
35
+ const KeyboardChart = ( ) => import ( '../views/charts/keyboard' ) ;
36
+ const KeyboardChart2 = ( ) => import ( '../views/charts/keyboard2' ) ;
37
+ const LineMarker = ( ) => import ( '../views/charts/line' ) ;
38
+ const MixChart = ( ) => import ( '../views/charts/mixchart' ) ;
39
+
40
+ /* error page */
41
+ const Err404 = ( ) => import ( '../views/error/404' ) ;
42
+ const Err401 = ( ) => import ( '../views/error/401' ) ;
43
+
44
+ /* error log */
45
+ const ErrorLog = ( ) => import ( '../views/errlog/index' ) ;
46
+
47
+ /* excel */
48
+ const ExcelDownload = ( ) => import ( '../views/excel/index' ) ;
49
+
50
+ /* theme */
51
+ const Theme = ( ) => import ( '../views/theme/index' ) ;
52
52
53
53
/* example*/
54
- const DynamicTable = resolve => require ( [ '../views/example/dynamictable' ] , resolve ) ;
55
- const Table = resolve => require ( [ '../views/example/table' ] , resolve ) ;
56
- const DragTable = resolve => require ( [ '../views/example/dragTable' ] , resolve ) ;
57
- const InlineEditTable = resolve => require ( [ '../views/example/inlineEditTable' ] , resolve ) ;
58
- const Form1 = resolve => require ( [ '../views/example/form1' ] , resolve ) ;
54
+ const DynamicTable = ( ) => import ( '../views/example/dynamictable' ) ;
55
+ const Table = ( ) => import ( '../views/example/table' ) ;
56
+ const DragTable = ( ) => import ( '../views/example/dragTable' ) ;
57
+ const InlineEditTable = ( ) => import ( '../views/example/inlineEditTable' ) ;
58
+ const Form1 = ( ) => import ( '../views/example/form1' ) ;
59
59
60
60
/* permission */
61
- const Permission = resolve => require ( [ '../views/permission/index' ] , resolve ) ;
61
+ const Permission = ( ) => import ( '../views/permission/index' ) ;
62
62
63
63
64
64
Vue . use ( Router ) ;
@@ -69,7 +69,7 @@ Vue.use(Router);
69
69
* redirect : if redirect:noredirect will not redirct in the levelbar
70
70
* noDropdown : if noDropdown:true will not has submenu
71
71
* meta : { role: ['admin'] } will control the page role
72
- */
72
+ ** /
73
73
74
74
export const constantRouterMap = [
75
75
{ path : '/login' , component : Login , hidden : true } ,
@@ -120,17 +120,17 @@ export const asyncRouterMap = [
120
120
name : '组件' ,
121
121
icon : 'zujian' ,
122
122
children : [
123
- { path : 'index' , component : componentsIndex , name : '介绍 ' } ,
124
- { path : 'tinymce' , component : Tinymce , name : '富文本编辑器' } ,
125
- { path : 'markdown' , component : Markdown , name : 'Markdown' } ,
126
- { path : 'jsoneditor' , component : JsonEditor , name : 'JSON编辑器' } ,
127
- { path : 'dndlist' , component : DndList , name : '列表拖拽' } ,
128
- { path : 'splitpane' , component : SplitPane , name : 'SplitPane' } ,
129
- { path : 'avatarupload' , component : AvatarUpload , name : '头像上传' } ,
130
- { path : 'dropzone' , component : Dropzone , name : 'Dropzone' } ,
131
- { path : 'sticky' , component : Sticky , name : 'Sticky' } ,
132
- { path : 'countto' , component : CountTo , name : 'CountTo' } ,
133
- { path : 'mixin' , component : Mixin , name : '小组件' }
123
+ { path : 'index' , component : componentsIndex , name : '介绍 ' } ,
124
+ { path : 'tinymce' , component : Tinymce , name : '富文本编辑器' } ,
125
+ { path : 'markdown' , component : Markdown , name : 'Markdown' } ,
126
+ { path : 'jsoneditor' , component : JsonEditor , name : 'JSON编辑器' } ,
127
+ { path : 'dndlist' , component : DndList , name : '列表拖拽' } ,
128
+ { path : 'splitpane' , component : SplitPane , name : 'SplitPane' } ,
129
+ { path : 'avatarupload' , component : AvatarUpload , name : '头像上传' } ,
130
+ { path : 'dropzone' , component : Dropzone , name : 'Dropzone' } ,
131
+ { path : 'sticky' , component : Sticky , name : 'Sticky' } ,
132
+ { path : 'countto' , component : CountTo , name : 'CountTo' } ,
133
+ { path : 'mixin' , component : Mixin , name : '小组件' }
134
134
]
135
135
} ,
136
136
{
@@ -140,11 +140,11 @@ export const asyncRouterMap = [
140
140
name : '图表' ,
141
141
icon : 'tubiaoleixingzhengchang' ,
142
142
children : [
143
- { path : 'index' , component : chartIndex , name : '介绍' } ,
144
- { path : 'keyboard' , component : KeyboardChart , name : '键盘图表' } ,
145
- { path : 'keyboard2' , component : KeyboardChart2 , name : '键盘图表2' } ,
146
- { path : 'line' , component : LineMarker , name : '折线图' } ,
147
- { path : 'mixchart' , component : MixChart , name : '混合图表' }
143
+ { path : 'index' , component : chartIndex , name : '介绍' } ,
144
+ { path : 'keyboard' , component : KeyboardChart , name : '键盘图表' } ,
145
+ { path : 'keyboard2' , component : KeyboardChart2 , name : '键盘图表2' } ,
146
+ { path : 'line' , component : LineMarker , name : '折线图' } ,
147
+ { path : 'mixchart' , component : MixChart , name : '混合图表' }
148
148
]
149
149
} ,
150
150
{
@@ -154,8 +154,8 @@ export const asyncRouterMap = [
154
154
name : '错误页面' ,
155
155
icon : '404' ,
156
156
children : [
157
- { path : '401' , component : Err401 , name : '401' } ,
158
- { path : '404' , component : Err404 , name : '404' }
157
+ { path : '401' , component : Err401 , name : '401' } ,
158
+ { path : '404' , component : Err404 , name : '404' }
159
159
]
160
160
} ,
161
161
{
@@ -192,11 +192,11 @@ export const asyncRouterMap = [
192
192
name : '综合实例' ,
193
193
icon : 'zonghe' ,
194
194
children : [
195
- { path : 'dynamictable' , component : DynamicTable , name : '动态table' } ,
196
- { path : 'dragtable' , component : DragTable , name : '拖拽table' } ,
197
- { path : 'inline_edit_table' , component : InlineEditTable , name : 'table内编辑' } ,
198
- { path : 'table' , component : Table , name : '综合table' } ,
199
- { path : 'form1' , component : Form1 , name : '综合form1' }
195
+ { path : 'dynamictable' , component : DynamicTable , name : '动态table' } ,
196
+ { path : 'dragtable' , component : DragTable , name : '拖拽table' } ,
197
+ { path : 'inline_edit_table' , component : InlineEditTable , name : 'table内编辑' } ,
198
+ { path : 'table' , component : Table , name : '综合table' } ,
199
+ { path : 'form1' , component : Form1 , name : '综合form1' }
200
200
]
201
201
} ,
202
202
{ path : '*' , redirect : '/404' , hidden : true }
0 commit comments