From b20304932aa9121f617daa0f33f90d90b1c0e70e Mon Sep 17 00:00:00 2001 From: ming680 <827668037@qq.com> Date: Wed, 25 Sep 2024 15:10:01 +0800 Subject: [PATCH] =?UTF-8?q?fix(menu):=20fix=20=E6=94=B6=E8=B5=B7=E6=A0=B7?= =?UTF-8?q?=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/menu/MenuItem.tsx | 27 ++++++++++----------------- 1 file changed, 10 insertions(+), 17 deletions(-) diff --git a/src/menu/MenuItem.tsx b/src/menu/MenuItem.tsx index e6780e9..421b766 100644 --- a/src/menu/MenuItem.tsx +++ b/src/menu/MenuItem.tsx @@ -32,14 +32,6 @@ export default class MenuItem extends Component { position: absolute; inset: 0; } - - .${getClassPrefix()}-menu__item .${getClassPrefix()}-menu__item-tooltip-inner { - width: 100%; - height: 100%; - display: flex; - align-items: center; - justify-content: center; - } `; static propTypes = { @@ -108,14 +100,15 @@ export default class MenuItem extends Component { ); - if (this.injection.collapsed.value && !this.props.disabled) { - return ( - -
{content}
-
- ); - } - - return
{content}
; + return ( + <> +
{content}
+ {this.injection.collapsed.value && !this.props.disabled ? ( + +
+ + ) : null} + + ); } }