feat: update menu styles

update menu styles to better display long titles

Change-Id: I4e766c7af18b30cb2751e433b11b61f5aaa01da7
This commit is contained in:
zhangjingwei 2024-03-08 13:15:14 +08:00
parent cc99a8199f
commit c9dc50a6cd
2 changed files with 6 additions and 2 deletions

View File

@ -175,7 +175,7 @@ export class LayoutMenu extends Component {
); );
} }
const title = ( const title = (
<span> <span className={styles['sub-menu-title']}>
{this.renderMenuItemIcon({ item })} {this.renderMenuItemIcon({ item })}
<span className={styles['menu-item-title']}> <span className={styles['menu-item-title']}>
{item.name.length >= this.maxTitleLength ? ( {item.name.length >= this.maxTitleLength ? (

View File

@ -380,7 +380,7 @@
span { span {
display: inline-block; display: inline-block;
max-width: 140px; max-width: 120px;
overflow: hidden; overflow: hidden;
white-space: nowrap; white-space: nowrap;
text-overflow: ellipsis; text-overflow: ellipsis;
@ -391,3 +391,7 @@
color: @sider-sub-menu-title-color; color: @sider-sub-menu-title-color;
font-size: @sider-sub-menu-title-font-size; font-size: @sider-sub-menu-title-font-size;
} }
.sub-menu-title {
display: flex;
}