|
@@ -5,7 +5,7 @@
|
|
<a :href="mainURL"><img :src="logoPng" /></a>
|
|
<a :href="mainURL"><img :src="logoPng" /></a>
|
|
</h2>
|
|
</h2>
|
|
<div class="right_menu_container">
|
|
<div class="right_menu_container">
|
|
- <a-dropdown placement="bottomRight" trigger="click">
|
|
|
|
|
|
+ <a-dropdown placement="bottomRight">
|
|
<template #overlay>
|
|
<template #overlay>
|
|
<a-menu style="width: 100px" @click="handlerLangClick">
|
|
<a-menu style="width: 100px" @click="handlerLangClick">
|
|
<a-menu-item
|
|
<a-menu-item
|
|
@@ -29,7 +29,12 @@
|
|
|
|
|
|
<a-dropdown placement="bottomRight">
|
|
<a-dropdown placement="bottomRight">
|
|
<template #overlay>
|
|
<template #overlay>
|
|
- <a-menu style="width: 100px" @click="handlerMenuClick">
|
|
|
|
|
|
+ <a-menu
|
|
|
|
+ :style="{
|
|
|
|
+ width: isEn ? '140px' : '100px'
|
|
|
|
+ }"
|
|
|
|
+ @click="handlerMenuClick"
|
|
|
|
+ >
|
|
<a-menu-item
|
|
<a-menu-item
|
|
v-for="menu in menus"
|
|
v-for="menu in menus"
|
|
:key="menu.key"
|
|
:key="menu.key"
|
|
@@ -87,6 +92,7 @@ const currentLang = computed(() => {
|
|
label: t(`base.lang.${unref(getLocale)}`)
|
|
label: t(`base.lang.${unref(getLocale)}`)
|
|
}
|
|
}
|
|
})
|
|
})
|
|
|
|
+const isEn = computed(() => unref(getLocale) === 'en')
|
|
// console.log('getImgSrc', getImgSrc)
|
|
// console.log('getImgSrc', getImgSrc)
|
|
const langList = localInfo.availableLocales.map((item: string) => {
|
|
const langList = localInfo.availableLocales.map((item: string) => {
|
|
return {
|
|
return {
|
|
@@ -99,8 +105,8 @@ const langList = localInfo.availableLocales.map((item: string) => {
|
|
console.log('langList', langList)
|
|
console.log('langList', langList)
|
|
|
|
|
|
const menus = [
|
|
const menus = [
|
|
- { label: '个人中心', key: 'user' },
|
|
|
|
- { label: '退出登录', key: 'logout' }
|
|
|
|
|
|
+ { label: t('base.personalCenter'), key: 'user' },
|
|
|
|
+ { label: t('base.logout'), key: 'logout' }
|
|
]
|
|
]
|
|
const handlerMenuClick: MenuProps['onClick'] = async e => {
|
|
const handlerMenuClick: MenuProps['onClick'] = async e => {
|
|
if (e.key === 'logout') {
|
|
if (e.key === 'logout') {
|