From 5ef08f7fae2c7b757f91e15e425ca53cdb034101 Mon Sep 17 00:00:00 2001 From: lf7817 <535536456@qq.com> Date: Mon, 11 Feb 2019 15:08:49 +0800 Subject: [PATCH] fix customize menu icon bug (#3509) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix customize menu icon bug 当采用自定义菜单图标(即通过url引用方式)且菜单折叠时,文字不隐藏 * fix customize menu icon bug 修改样式 --- src/components/SiderMenu/BaseMenu.js | 2 +- src/components/SiderMenu/index.less | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/SiderMenu/BaseMenu.js b/src/components/SiderMenu/BaseMenu.js index 2ad61134..10a0eb76 100644 --- a/src/components/SiderMenu/BaseMenu.js +++ b/src/components/SiderMenu/BaseMenu.js @@ -15,7 +15,7 @@ const { SubMenu } = Menu; // icon: , const getIcon = icon => { if (typeof icon === 'string' && isUrl(icon)) { - return icon; + return icon} />; } if (typeof icon === 'string') { return ; diff --git a/src/components/SiderMenu/index.less b/src/components/SiderMenu/index.less index c08248d1..fc14cd26 100644 --- a/src/components/SiderMenu/index.less +++ b/src/components/SiderMenu/index.less @@ -66,8 +66,8 @@ } .icon { + vertical-align: baseline; width: 14px; - margin-right: 10px; } :global { -- GitLab