|
|
|
@ -8,13 +8,13 @@ import Layout from '../views/layout/Layout'
|
|
|
|
|
|
|
|
|
|
Vue.use(Router)
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* icon : the icon show in the sidebar
|
|
|
|
|
* hidden : if `hidden:true` will not show in the sidebar
|
|
|
|
|
* redirect : if `redirect:noredirect` will not redirct in the levelbar
|
|
|
|
|
* noDropdown : if `noDropdown:true` will not has submenu in the sidebar
|
|
|
|
|
* meta : `{ role: ['admin'] }` will control the page role
|
|
|
|
|
**/
|
|
|
|
|
/**
|
|
|
|
|
* icon : the icon show in the sidebar
|
|
|
|
|
* hidden : if `hidden:true` will not show in the sidebar
|
|
|
|
|
* redirect : if `redirect:noredirect` will not redirct in the levelbar
|
|
|
|
|
* noDropdown : if `noDropdown:true` will not has submenu in the sidebar
|
|
|
|
|
* meta : `{ role: ['admin'] }` will control the page role
|
|
|
|
|
**/
|
|
|
|
|
export const constantRouterMap = [
|
|
|
|
|
{ path: '/login', component: _import('login/index'), hidden: true },
|
|
|
|
|
{ path: '/404', component: _import('404'), hidden: true },
|
|
|
|
@ -25,16 +25,8 @@ export const constantRouterMap = [
|
|
|
|
|
name: 'Dashboard',
|
|
|
|
|
hidden: true,
|
|
|
|
|
children: [{ path: 'dashboard', component: _import('dashboard/index') }]
|
|
|
|
|
}
|
|
|
|
|
]
|
|
|
|
|
|
|
|
|
|
export default new Router({
|
|
|
|
|
// mode: 'history', //后端支持可开
|
|
|
|
|
scrollBehavior: () => ({ y: 0 }),
|
|
|
|
|
routes: constantRouterMap
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
export const asyncRouterMap = [
|
|
|
|
|
{
|
|
|
|
|
path: '/example',
|
|
|
|
|
component: Layout,
|
|
|
|
@ -57,3 +49,10 @@ export const asyncRouterMap = [
|
|
|
|
|
|
|
|
|
|
{ path: '*', redirect: '/404', hidden: true }
|
|
|
|
|
]
|
|
|
|
|
|
|
|
|
|
export default new Router({
|
|
|
|
|
// mode: 'history', //后端支持可开
|
|
|
|
|
scrollBehavior: () => ({ y: 0 }),
|
|
|
|
|
routes: constantRouterMap
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|