@ -1,6 +1,6 @@
import Vue from 'vue'
import Router from 'vue-router'
const _import = require ( './_import_' + process . env . NODE _ENV )
// 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;
// detail: https://panjiachen.github.io/vue-element-admin-site/#/lazy-loading
@ -19,8 +19,8 @@ import Layout from '../views/layout/Layout'
}
* * /
export const constantRouterMap = [
{ path : '/login' , component : _import ( ' login/index') , hidden : true } ,
{ path : '/404' , component : _import ( ' 404') , hidden : true } ,
{ path : '/login' , component : ( ) => import ( '@/views/ login/index') , hidden : true } ,
{ path : '/404' , component : ( ) => import ( '@/views/ 404') , hidden : true } ,
{
path : '/' ,
@ -30,7 +30,7 @@ export const constantRouterMap = [
hidden : true ,
children : [ {
path : 'dashboard' ,
component : _import ( ' dashboard/index')
component : ( ) => import ( '@/views/ dashboard/index')
} ]
} ,
@ -44,13 +44,13 @@ export const constantRouterMap = [
{
path : 'table' ,
name : 'Table' ,
component : _import ( ' table/index') ,
component : ( ) => import ( '@/views/ table/index') ,
meta : { title : 'Table' , icon : 'table' }
} ,
{
path : 'tree' ,
name : 'Tree' ,
component : _import ( ' tree/index') ,
component : ( ) => import ( '@/views/ tree/index') ,
meta : { title : 'Tree' , icon : 'tree' }
}
]
@ -63,7 +63,7 @@ export const constantRouterMap = [
{
path : 'index' ,
name : 'Form' ,
component : _import ( ' form/index') ,
component : ( ) => import ( '@/views/ form/index') ,
meta : { title : 'Form' , icon : 'form' }
}
]