AppHeader.vue 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. <!-- @format -->
  2. <script lang="ts" setup>
  3. import { useUserStore } from '@/stores/modules/user'
  4. const userStore = useUserStore()
  5. const { isLogin } = storeToRefs(userStore)
  6. // 使用 useI18n 钩子
  7. const { t } = useI18n()
  8. </script>
  9. <template>
  10. <div class="flex justify-between h-42px w-1400px mx-auto">
  11. <div class="flex items-center">
  12. <NuxtLink to="/">
  13. <img
  14. src="~/assets/images/ejet_logo.png"
  15. alt="logo"
  16. class="w-200px h-31px cursor-pointer"
  17. >
  18. </NuxtLink>
  19. </div>
  20. <div class="flex items-center ">
  21. <!-- 使用 t 方法获取翻译文本 -->
  22. <NuxtLink to="/blog" class="underline !text-#333333">
  23. <!-- {{ t('Popular_test') }} -->
  24. BLOGS
  25. </NuxtLink>
  26. <!-- <NuxtLink to="/" class="hover:underline">
  27. SELL ON EJET
  28. </NuxtLink> -->
  29. <!-- <div class="w-1px bg-#D8D8D8 h-20px mx-20px" />
  30. <select-lang /> -->
  31. <!-- <div class="w-1px bg-#D8D8D8 h-20px mx-20px" v-if="isLogin"/>
  32. <NuxtLink v-if="isLogin" to="/cart">
  33. <svgo-cart class="!w-24px !h-24px ml-20px" />
  34. </NuxtLink> -->
  35. <user-avatar class="ml-30px" />
  36. </div>
  37. </div>
  38. </template>
  39. <style lang="less" scoped></style>