Commit 25b475bb by Sendya

Updated router help

parent 94156f4a
...@@ -90,7 +90,7 @@ export default { ...@@ -90,7 +90,7 @@ export default {
) )
}, },
renderItem: function (h, menu, pIndex, index) { renderItem: function (h, menu, pIndex, index) {
if (!menu.invisible) { if (!menu.hidden) {
return menu.children ? this.renderSubMenu(h, menu, pIndex, index) : this.renderMenuItem(h, menu, pIndex, index) return menu.children ? this.renderSubMenu(h, menu, pIndex, index) : this.renderMenuItem(h, menu, pIndex, index)
} }
}, },
......
...@@ -5,6 +5,9 @@ import LayoutBase from '../components/layout/LayoutBaseView' ...@@ -5,6 +5,9 @@ import LayoutBase from '../components/layout/LayoutBaseView'
Vue.use(Router) Vue.use(Router)
/** /**
* 路由配置说明:
* 建议:sider menu 请不要超过三级菜单,若超过三级菜单,则应该设计为顶部主菜单 配合左侧次级菜单
*
* hidden: true if `hidden:true` will not show in the sidebar(default is false) * hidden: true if `hidden:true` will not show in the sidebar(default is false)
* alwaysShow: true if set true, will always show the root menu, whatever its child routes length * alwaysShow: true if set true, will always show the root menu, whatever its child routes length
* if not set alwaysShow, only more than one route under the children * if not set alwaysShow, only more than one route under the children
...@@ -14,6 +17,7 @@ Vue.use(Router) ...@@ -14,6 +17,7 @@ Vue.use(Router)
* meta : { * meta : {
title: 'title' the name show in submenu and breadcrumb (recommend set) title: 'title' the name show in submenu and breadcrumb (recommend set)
icon: 'svg-name' the icon show in the sidebar, icon: 'svg-name' the icon show in the sidebar,
keepAlive: true keep alive component
hiddenPageHeader: true if `hiddenPageHeader: true` will not show page-header(details) hiddenPageHeader: true if `hiddenPageHeader: true` will not show page-header(details)
} }
**/ **/
...@@ -60,6 +64,7 @@ export const asyncRouterMap = [ ...@@ -60,6 +64,7 @@ export const asyncRouterMap = [
{ {
path: '/dashboard/monitor', path: '/dashboard/monitor',
name: 'Monitor', name: 'Monitor',
hidden: true,
component: () => import('../views/dashboard/Monitor'), component: () => import('../views/dashboard/Monitor'),
meta: { title: '监控页', hideHeader: true } meta: { title: '监控页', hideHeader: true }
}, },
......
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