gemercheung 2 年之前
父节点
当前提交
21ca69696e
共有 3 个文件被更改,包括 3 次插入4 次删除
  1. 二进制
      src/assets/images/logo_en.png
  2. 0 0
      src/assets/images/logo_zh.png
  3. 3 4
      src/layout/header.vue

二进制
src/assets/images/logo_en.png


src/assets/images/logo.png → src/assets/images/logo_zh.png


+ 3 - 4
src/layout/header.vue

@@ -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}`)