|
@@ -1,6 +1,6 @@
|
1
|
1
|
import Vue from 'vue'
|
2
|
2
|
import Router from 'vue-router'
|
3
|
|
-const _import = require('./_import_' + process.env.NODE_ENV)
|
|
3
|
+
|
4
|
4
|
// in development-env not use lazy-loading, because lazy-loading too many pages will cause webpack hot update too slow. so only in production use lazy-loading;
|
5
|
5
|
// detail: https://panjiachen.github.io/vue-element-admin-site/#/lazy-loading
|
6
|
6
|
|
|
@@ -19,8 +19,8 @@ import Layout from '../views/layout/Layout'
|
19
|
19
|
}
|
20
|
20
|
**/
|
21
|
21
|
export const constantRouterMap = [
|
22
|
|
- { path: '/login', component: _import('login/index'), hidden: true },
|
23
|
|
- { path: '/404', component: _import('404'), hidden: true },
|
|
22
|
+ { path: '/login', component: () => import('@/views/login/index'), hidden: true },
|
|
23
|
+ { path: '/404', component: () => import('@/views/404'), hidden: true },
|
24
|
24
|
|
25
|
25
|
{
|
26
|
26
|
path: '/',
|
|
@@ -30,7 +30,7 @@ export const constantRouterMap = [
|
30
|
30
|
hidden: true,
|
31
|
31
|
children: [{
|
32
|
32
|
path: 'dashboard',
|
33
|
|
- component: _import('dashboard/index')
|
|
33
|
+ component: () => import('@/views/dashboard/index')
|
34
|
34
|
}]
|
35
|
35
|
},
|
36
|
36
|
|
|
@@ -44,13 +44,13 @@ export const constantRouterMap = [
|
44
|
44
|
{
|
45
|
45
|
path: 'table',
|
46
|
46
|
name: 'Table',
|
47
|
|
- component: _import('table/index'),
|
|
47
|
+ component: () => import('@/views/table/index'),
|
48
|
48
|
meta: { title: 'Table', icon: 'table' }
|
49
|
49
|
},
|
50
|
50
|
{
|
51
|
51
|
path: 'tree',
|
52
|
52
|
name: 'Tree',
|
53
|
|
- component: _import('tree/index'),
|
|
53
|
+ component: () => import('@/views/tree/index'),
|
54
|
54
|
meta: { title: 'Tree', icon: 'tree' }
|
55
|
55
|
}
|
56
|
56
|
]
|
|
@@ -63,7 +63,7 @@ export const constantRouterMap = [
|
63
|
63
|
{
|
64
|
64
|
path: 'index',
|
65
|
65
|
name: 'Form',
|
66
|
|
- component: _import('form/index'),
|
|
66
|
+ component: () => import('@/views/form/index'),
|
67
|
67
|
meta: { title: 'Form', icon: 'form' }
|
68
|
68
|
}
|
69
|
69
|
]
|