fix: page showInMenu=true

This commit is contained in:
chenos 2020-12-13 17:15:02 +08:00
parent b6bce5a2dc
commit a3107721c2
2 changed files with 8 additions and 1 deletions

View File

@ -52,6 +52,7 @@ const data = {
icon: 'DashboardOutlined',
template: 'page1',
sort: 20,
showInMenu: true,
},
{
title: '数据',
@ -60,6 +61,7 @@ const data = {
icon: 'DatabaseOutlined',
template: 'SideMenuLayout',
sort: 30,
showInMenu: true,
children: [
// {
// title: '页面3',
@ -86,6 +88,7 @@ const data = {
icon: 'TeamOutlined',
template: 'SideMenuLayout',
sort: 70,
showInMenu: true,
children: [
{
title: '用户管理',
@ -95,6 +98,7 @@ const data = {
template: 'collection',
collection: 'users',
sort: 80,
showInMenu: true,
},
]
},
@ -105,6 +109,7 @@ const data = {
icon: 'SettingOutlined',
template: 'SideMenuLayout',
sort: 90,
showInMenu: true,
children: [
{
title: '页面与菜单',
@ -114,6 +119,7 @@ const data = {
icon: 'MenuOutlined',
sort: 100,
developerMode: true,
showInMenu: true,
},
{
title: '数据表配置',
@ -122,6 +128,7 @@ const data = {
path: '/settings/collections',
icon: 'TableOutlined',
sort: 110,
showInMenu: true,
},
]
},

View File

@ -20,7 +20,7 @@ export default (props: any) => {
defaultOpenKeys={paths.filter(path => pathcamp(location.pathname, path)).concat(location.pathname)}
{...restProps}
>
{items.map(item => (
{items.map(item => item.showInMenu && (
<Menu.Item key={item.path}>
<Link to={item.path}><Icon type={item.icon}/> {item.title}</Link>
</Menu.Item>