From c9dc50a6cd743c1608a5b96e478c581b04d45179 Mon Sep 17 00:00:00 2001 From: zhangjingwei Date: Fri, 8 Mar 2024 13:15:14 +0800 Subject: [PATCH] feat: update menu styles update menu styles to better display long titles Change-Id: I4e766c7af18b30cb2751e433b11b61f5aaa01da7 --- src/layouts/Base/Menu.jsx | 2 +- src/layouts/Base/index.less | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/layouts/Base/Menu.jsx b/src/layouts/Base/Menu.jsx index 24021a4d..20a7505f 100644 --- a/src/layouts/Base/Menu.jsx +++ b/src/layouts/Base/Menu.jsx @@ -175,7 +175,7 @@ export class LayoutMenu extends Component { ); } const title = ( - + {this.renderMenuItemIcon({ item })} {item.name.length >= this.maxTitleLength ? ( diff --git a/src/layouts/Base/index.less b/src/layouts/Base/index.less index 947b8f96..1e7a6bb4 100644 --- a/src/layouts/Base/index.less +++ b/src/layouts/Base/index.less @@ -380,7 +380,7 @@ span { display: inline-block; - max-width: 140px; + max-width: 120px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; @@ -391,3 +391,7 @@ color: @sider-sub-menu-title-color; font-size: @sider-sub-menu-title-font-size; } + +.sub-menu-title { + display: flex; +}