fix: 菜单名称过长时没有正确显示省略号

pull/870/head
lijiahui 2026-03-30 15:31:51 +08:00
parent f29a384904
commit 491e09c136
1 changed files with 10 additions and 2 deletions

View File

@ -10,12 +10,20 @@ export const useRenderMenuTitle = () => {
return icon ? ( return icon ? (
<> <>
<Icon icon={meta.icon}></Icon> <Icon icon={meta.icon}></Icon>
<span class="v-menu__title overflow-hidden overflow-ellipsis whitespace-nowrap"> <span
class="v-menu__title truncate"
style="padding-right: calc(var(--el-menu-base-level-padding) + 12px);"
title={t(title as string)}
>
{t(title as string)} {t(title as string)}
</span> </span>
</> </>
) : ( ) : (
<span class="v-menu__title overflow-hidden overflow-ellipsis whitespace-nowrap"> <span
class="v-menu__title truncate"
style="padding-right: calc(var(--el-menu-base-level-padding) + 12px);"
title={t(title as string)}
>
{t(title as string)} {t(title as string)}
</span> </span>
) )