style: 菜单支持超出省略号

This commit is contained in:
kailong321200875 2024-01-06 15:12:41 +08:00
parent 3ad467f0f7
commit a926c5607a
2 changed files with 7 additions and 3 deletions

View File

@ -10,10 +10,14 @@ export const useRenderMenuTitle = () => {
return icon ? (
<>
<Icon icon={meta.icon}></Icon>
<span class="v-menu__title">{t(title as string)}</span>
<span class="v-menu__title overflow-hidden overflow-ellipsis whitespace-nowrap">
{t(title as string)}
</span>
</>
) : (
<span class="v-menu__title">{t(title as string)}</span>
<span class="v-menu__title overflow-hidden overflow-ellipsis whitespace-nowrap">
{t(title as string)}
</span>
)
}

View File

@ -5,7 +5,7 @@ import en from 'element-plus/es/locale/lang/en'
import { useStorage } from '@/hooks/web/useStorage'
import { LocaleDropdownType } from '@/components/LocaleDropdown'
const { getStorage, setStorage } = useStorage()
const { getStorage, setStorage } = useStorage('localStorage')
const elLocaleMap = {
'zh-CN': zhCn,