From a3107721c231be3176f55d8dbf23164f79161165 Mon Sep 17 00:00:00 2001 From: chenos Date: Sun, 13 Dec 2020 17:15:02 +0800 Subject: [PATCH] fix: page showInMenu=true --- packages/app/src/api/migrate.ts | 7 +++++++ packages/app/src/components/menu/index.tsx | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/packages/app/src/api/migrate.ts b/packages/app/src/api/migrate.ts index 80e3588d2..be1f7f135 100644 --- a/packages/app/src/api/migrate.ts +++ b/packages/app/src/api/migrate.ts @@ -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, }, ] }, diff --git a/packages/app/src/components/menu/index.tsx b/packages/app/src/components/menu/index.tsx index 3faeebe4b..811fde396 100644 --- a/packages/app/src/components/menu/index.tsx +++ b/packages/app/src/components/menu/index.tsx @@ -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 && ( {item.title}