Commit 64f83ad0 authored by 智勇's avatar 智勇

注释实例路由

parent a37da656
......@@ -7,11 +7,11 @@ Vue.use(Router)
import Layout from '@/views/layout/Layout'
/* Router Modules */
import componentsRouter from './modules/components'
import chartsRouter from './modules/charts'
// import componentsRouter from './modules/components'
// import chartsRouter from './modules/charts'
// import tableRouter from './modules/table'
// import nestedRouter from './modules/nested'
import dockersRouter from './modules/docker'
import tableRouter from './modules/table'
import nestedRouter from './modules/nested'
/** note: sub-menu only appear when children.length>=1
* detail see https://panjiachen.github.io/vue-element-admin-site/guide/essentials/router-and-nav.html
......@@ -90,33 +90,33 @@ export const constantRouterMap = [
meta: { title: 'indexList', icon: 'link' }
}
]
},
{
path: '/documentation',
component: Layout,
redirect: '/documentation/index',
children: [
{
path: 'index',
component: () => import('@/views/documentation/index'),
name: 'Documentation',
meta: { title: 'documentation', icon: 'documentation', affix: true }
}
]
},
{
path: '/guide',
component: Layout,
redirect: '/guide/index',
children: [
{
path: 'index',
component: () => import('@/views/guide/index'),
name: 'Guide',
meta: { title: 'guide', icon: 'guide', noCache: true }
}
]
}
// {
// path: '/documentation',
// component: Layout,
// redirect: '/documentation/index',
// children: [
// {
// path: 'index',
// component: () => import('@/views/documentation/index'),
// name: 'Documentation',
// meta: { title: 'documentation', icon: 'documentation', affix: true }
// }
// ]
// },
// {
// path: '/guide',
// component: Layout,
// redirect: '/guide/index',
// children: [
// {
// path: 'index',
// component: () => import('@/views/guide/index'),
// name: 'Guide',
// meta: { title: 'guide', icon: 'guide', noCache: true }
// }
// ]
// }
]
export default new Router({
......@@ -126,6 +126,7 @@ export default new Router({
})
export const asyncRouterMap = [
dockersRouter,
{
path: '/dbsync',
component: Layout,
......@@ -153,30 +154,31 @@ export const asyncRouterMap = [
}
]
},
{
path: '/statistics',
path: '/proconfig',
component: Layout,
redirect: 'noredirect',
children: [
{
path: '',
component: () => import('@/views/statistics/index'),
name: 'statistics',
meta: { title: '用户行为记录', icon: 'peoples' }
component: () => import('@/views/proconfig/index'),
name: 'proconfig',
meta: { title: '项目配置文件管理', icon: 'documentation' }
}
]
},
{
path: '/proconfig',
path: '/statistics',
component: Layout,
redirect: 'noredirect',
children: [
{
path: '',
component: () => import('@/views/proconfig/index'),
name: 'proconfig',
meta: { title: '项目配置文件管理', icon: 'documentation' }
component: () => import('@/views/statistics/index'),
name: 'statistics',
meta: { title: '用户行为记录', icon: 'peoples' }
}
]
},
......@@ -219,102 +221,102 @@ export const asyncRouterMap = [
}
]
},
{
path: '/permission',
component: Layout,
redirect: '/permission/index',
alwaysShow: true, // will always show the root menu
meta: {
title: 'permission',
icon: 'lock',
roles: ['admin', 'editor'] // you can set roles in root nav
},
children: [
{
path: 'page',
component: () => import('@/views/permission/page'),
name: 'PagePermission',
meta: {
title: 'pagePermission',
roles: ['admin'] // or you can only set roles in sub nav
}
},
{
path: 'directive',
component: () => import('@/views/permission/directive'),
name: 'DirectivePermission',
meta: {
title: 'directivePermission'
// if do not set roles, means: this page does not require permission
}
}
]
},
{
path: '/icon',
component: Layout,
children: [
{
path: 'index',
component: () => import('@/views/svg-icons/index'),
name: 'Icons',
meta: { title: 'icons', icon: 'icon', noCache: true }
}
]
},
// {
// path: '/permission',
// component: Layout,
// redirect: '/permission/index',
// alwaysShow: true, // will always show the root menu
// meta: {
// title: 'permission',
// icon: 'lock',
// roles: ['admin', 'editor'] // you can set roles in root nav
// },
// children: [
// {
// path: 'page',
// component: () => import('@/views/permission/page'),
// name: 'PagePermission',
// meta: {
// title: 'pagePermission',
// roles: ['admin'] // or you can only set roles in sub nav
// }
// },
// {
// path: 'directive',
// component: () => import('@/views/permission/directive'),
// name: 'DirectivePermission',
// meta: {
// title: 'directivePermission'
// // if do not set roles, means: this page does not require permission
// }
// }
// ]
// },
// {
// path: '/icon',
// component: Layout,
// children: [
// {
// path: 'index',
// component: () => import('@/views/svg-icons/index'),
// name: 'Icons',
// meta: { title: 'icons', icon: 'icon', noCache: true }
// }
// ]
// },
/** When your routing table is too long, you can split it into small modules**/
componentsRouter,
chartsRouter,
nestedRouter,
tableRouter,
dockersRouter,
// componentsRouter,
// chartsRouter,
// nestedRouter,
// tableRouter,
{
path: '/example',
component: Layout,
redirect: '/example/list',
name: 'Example',
meta: {
title: 'example',
icon: 'example'
},
children: [
{
path: 'create',
component: () => import('@/views/example/create'),
name: 'CreateArticle',
meta: { title: 'createArticle', icon: 'edit' }
},
{
path: 'edit/:id(\\d+)',
component: () => import('@/views/example/edit'),
name: 'EditArticle',
meta: { title: 'editArticle', noCache: true },
hidden: true
},
{
path: 'list',
component: () => import('@/views/example/list'),
name: 'ArticleList',
meta: { title: 'articleList', icon: 'list' }
}
]
},
// {
// path: '/example',
// component: Layout,
// redirect: '/example/list',
// name: 'Example',
// meta: {
// title: 'example',
// icon: 'example'
// },
// children: [
// {
// path: 'create',
// component: () => import('@/views/example/create'),
// name: 'CreateArticle',
// meta: { title: 'createArticle', icon: 'edit' }
// },
// {
// path: 'edit/:id(\\d+)',
// component: () => import('@/views/example/edit'),
// name: 'EditArticle',
// meta: { title: 'editArticle', noCache: true },
// hidden: true
// },
// {
// path: 'list',
// component: () => import('@/views/example/list'),
// name: 'ArticleList',
// meta: { title: 'articleList', icon: 'list' }
// }
// ]
// },
{
path: '/tab',
component: Layout,
children: [
{
path: 'index',
component: () => import('@/views/tab/index'),
name: 'Tab',
meta: { title: 'tab', icon: 'tab' }
}
]
},
// {
// path: '/tab',
// component: Layout,
// children: [
// {
// path: 'index',
// component: () => import('@/views/tab/index'),
// name: 'Tab',
// meta: { title: 'tab', icon: 'tab' }
// }
// ]
// },
// {
// path: '/error',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment