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

Merge pull request !870 from 李家辉/fix-text-overflow
feat/mes
芋道源码 2026-05-03 10:38:57 +00:00 committed by Gitee
commit 2e65691737
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
1 changed files with 10 additions and 2 deletions

View File

@ -10,12 +10,20 @@ export const useRenderMenuTitle = () => {
return 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)}
</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)}
</span>
)