Skip to content

Commit

Permalink
style: 菜单支持超出省略号
Browse files Browse the repository at this point in the history
  • Loading branch information
kailong321200875 committed Jan 6, 2024
1 parent 3ad467f commit a926c56
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
8 changes: 6 additions & 2 deletions src/components/Menu/src/components/useRenderMenuTitle.tsx
Expand Up @@ -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>
)
}

Expand Down
2 changes: 1 addition & 1 deletion src/store/modules/locale.ts
Expand Up @@ -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,
Expand Down

0 comments on commit a926c56

Please sign in to comment.