From 43eedc03aa5cc9f49b5885de50a1cf8bb993e26e Mon Sep 17 00:00:00 2001 From: Ivocin <1044514593@qq.com> Date: Thu, 20 Sep 2018 16:14:14 +0800 Subject: [PATCH] fix (#2182): top menu layout without submenu display issue add a class named 'top-nave-menu' when BaseMenu mode is horizontal to fixed height promblem --- src/components/SiderMenu/BaseMenu.js | 1 + src/components/SiderMenu/index.less | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/src/components/SiderMenu/BaseMenu.js b/src/components/SiderMenu/BaseMenu.js index e1849bf9..16f9c479 100644 --- a/src/components/SiderMenu/BaseMenu.js +++ b/src/components/SiderMenu/BaseMenu.js @@ -179,6 +179,7 @@ export default class BaseMenu extends PureComponent { onOpenChange={handleOpenChange} selectedKeys={selectedKeys} style={style} + className={mode === 'horizontal' ? 'top-nav-menu' : ''} {...props} > {this.getNavMenuItems(menuData)} diff --git a/src/components/SiderMenu/index.less b/src/components/SiderMenu/index.less index a0feac3d..550feaff 100644 --- a/src/components/SiderMenu/index.less +++ b/src/components/SiderMenu/index.less @@ -62,6 +62,10 @@ } :global { + .top-nav-menu li.ant-menu-item { + height: 64px; + line-height: 64px; + } .drawer .drawer-content { background: #001529; } -- GitLab