|
@@ -68,7 +68,7 @@ import { MenuProps } from 'ant-design-vue'
|
|
|
import { useUserStore } from '@/store/modules/user'
|
|
|
import { postLogout } from '@/api'
|
|
|
import { mainURL } from '@/env'
|
|
|
-import logoPng from '@/assets/images/logo.png'
|
|
|
+// import logoPng from '@/assets/images/logo.png'
|
|
|
import { useLocaleStore } from '@/store/modules/locale'
|
|
|
import { useI18n } from '@/hook/useI18n'
|
|
|
import { useLocale } from '@/locales/useLocale'
|
|
@@ -77,8 +77,6 @@ import { LocaleType } from '#/config'
|
|
|
import { showLoading } from '@/components/loading'
|
|
|
import { getImgSrc } from '@/utils/getImgSrc'
|
|
|
import browser from '@/utils/browser'
|
|
|
-import { storeToRefs } from 'pinia'
|
|
|
-// const getImgSrc = inject('getImgSrc')
|
|
|
|
|
|
defineOptions({ name: 'LayoutHeader' })
|
|
|
|
|
@@ -93,6 +91,8 @@ const currentLang = ref({
|
|
|
label: t(`base.lang.${unref(getLocale)}`)
|
|
|
})
|
|
|
|
|
|
+const logoPng = computed(() => getImgSrc(`logo_${unref(currentLang).key}`))
|
|
|
+
|
|
|
// const currentLang = computed(() => {
|
|
|
// return {
|
|
|
// key: getLocale,
|
|
@@ -116,7 +116,6 @@ const menus = [
|
|
|
{ label: 'base.logout', key: 'logout' }
|
|
|
]
|
|
|
const handlerMenuClick: MenuProps['onClick'] = async e => {
|
|
|
-
|
|
|
if (e.key === 'logout') {
|
|
|
await postLogout()
|
|
|
location.replace(`${mainURL}/?lang=${currentLang.value.key}`)
|