|
@@ -13,10 +13,21 @@
|
|
|
|
|
|
<!-- right -->
|
|
<!-- right -->
|
|
<div class="nav__right navbar__right">
|
|
<div class="nav__right navbar__right">
|
|
- <!-- <div class="language-toggle">
|
|
|
|
- <img src="@/public/images/icons/language-toggle__icon.png" />
|
|
|
|
- <span>{{ systemStore.localeInfo && systemStore.localeInfo.name }}</span>
|
|
|
|
- </div> -->
|
|
|
|
|
|
+ <a-dropdown>
|
|
|
|
+ <div class="language-toggle">
|
|
|
|
+ <img src="@/public/images/icons/language-toggle__icon.png" />
|
|
|
|
+ <span>{{ localeInfo && localeInfo.name }}</span>
|
|
|
|
+ </div>
|
|
|
|
+ <template #overlay>
|
|
|
|
+ <a-menu>
|
|
|
|
+ <a-menu-item v-for="(item, index) in systemStore.localeList" :key="index">
|
|
|
|
+ <div @click="onLocaleChange(item)">
|
|
|
|
+ <span class="text_hover_underline">{{ item.name }}</span>
|
|
|
|
+ </div>
|
|
|
|
+ </a-menu-item>
|
|
|
|
+ </a-menu>
|
|
|
|
+ </template>
|
|
|
|
+ </a-dropdown>
|
|
<div class="login-btn">
|
|
<div class="login-btn">
|
|
<span>{{ $t('system["登录"]') }}</span>
|
|
<span>{{ $t('system["登录"]') }}</span>
|
|
</div>
|
|
</div>
|
|
@@ -29,7 +40,7 @@
|
|
<div class="nav__box subnav__box">
|
|
<div class="nav__box subnav__box">
|
|
<!-- left -->
|
|
<!-- left -->
|
|
<div class="nav__left subnav__left">
|
|
<div class="nav__left subnav__left">
|
|
- <img src="@/public/images/logo.png" alt="" style="width: 150px" />
|
|
|
|
|
|
+ <img src="@/public/images/logo.png" />
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<!-- right -->
|
|
<!-- right -->
|
|
@@ -45,7 +56,7 @@
|
|
<div class="nav-menus">
|
|
<div class="nav-menus">
|
|
<a-dropdown>
|
|
<a-dropdown>
|
|
<div class="menus__btn">
|
|
<div class="menus__btn">
|
|
- <MenuOutlined style="font-size: 20px; color: #000" />
|
|
|
|
|
|
+ <MenuOutlined style="font-size: 20px; font-size: 1.25rem; color: #000" />
|
|
</div>
|
|
</div>
|
|
<template #overlay>
|
|
<template #overlay>
|
|
<a-menu>
|
|
<a-menu>
|
|
@@ -73,15 +84,23 @@
|
|
|
|
|
|
|
|
|
|
<script setup lang="ts">
|
|
<script setup lang="ts">
|
|
|
|
+import { useI18n } from 'vue-i18n'
|
|
|
|
+import { storeToRefs } from 'pinia'
|
|
import { MenuOutlined, HomeOutlined } from '@ant-design/icons-vue'
|
|
import { MenuOutlined, HomeOutlined } from '@ant-design/icons-vue'
|
|
import useSystemStore from '@/stores/useSystemStore'
|
|
import useSystemStore from '@/stores/useSystemStore'
|
|
|
|
+import type { ILocale } from '@/stores/useSystemStore'
|
|
import useLinkList from './hooks/useLinkList'
|
|
import useLinkList from './hooks/useLinkList'
|
|
|
|
|
|
|
|
+const i18n = useI18n()
|
|
const systemStore = useSystemStore()
|
|
const systemStore = useSystemStore()
|
|
-
|
|
|
|
-console.log('systemStore', systemStore)
|
|
|
|
|
|
+const { localeInfo, localeList } = storeToRefs(systemStore)
|
|
|
|
|
|
const { textLinkList, textLinkList2, handleTextLinkClick } = useLinkList()
|
|
const { textLinkList, textLinkList2, handleTextLinkClick } = useLinkList()
|
|
|
|
+
|
|
|
|
+const onLocaleChange = function (info: ILocale) {
|
|
|
|
+ systemStore.toggleLocale(info)
|
|
|
|
+ i18n.locale.value = info.value
|
|
|
|
+}
|
|
</script>
|
|
</script>
|
|
|
|
|
|
|
|
|
|
@@ -101,8 +120,10 @@ const { textLinkList, textLinkList2, handleTextLinkClick } = useLinkList()
|
|
|
|
|
|
.nav__box {
|
|
.nav__box {
|
|
min-width: 1200px;
|
|
min-width: 1200px;
|
|
|
|
+ min-width: 75rem;
|
|
width: var(--layout-width-1200);
|
|
width: var(--layout-width-1200);
|
|
padding: 0 15px;
|
|
padding: 0 15px;
|
|
|
|
+ padding: 0 0.9375rem;
|
|
}
|
|
}
|
|
|
|
|
|
.navbar__box,
|
|
.navbar__box,
|
|
@@ -111,6 +132,7 @@ const { textLinkList, textLinkList2, handleTextLinkClick } = useLinkList()
|
|
justify-content: space-between;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
align-items: center;
|
|
height: 60px;
|
|
height: 60px;
|
|
|
|
+ height: 3.75rem;
|
|
}
|
|
}
|
|
|
|
|
|
.nav__left {
|
|
.nav__left {
|
|
@@ -124,29 +146,47 @@ const { textLinkList, textLinkList2, handleTextLinkClick } = useLinkList()
|
|
align-items: center;
|
|
align-items: center;
|
|
color: #000;
|
|
color: #000;
|
|
font-size: 14px;
|
|
font-size: 14px;
|
|
|
|
+ font-size: 0.875rem;
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+.subnav__left {
|
|
|
|
+ img {
|
|
|
|
+ width: 150px;
|
|
|
|
+ width: 9.375rem;
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
|
|
.language-toggle {
|
|
.language-toggle {
|
|
display: flex;
|
|
display: flex;
|
|
align-items: center;
|
|
align-items: center;
|
|
margin-right: 30px;
|
|
margin-right: 30px;
|
|
|
|
+ margin-right: 1.875rem;
|
|
cursor: pointer;
|
|
cursor: pointer;
|
|
|
|
+ min-width: 84px;
|
|
|
|
+ min-width: 5.25rem;
|
|
|
|
|
|
img {
|
|
img {
|
|
margin-right: 6px;
|
|
margin-right: 6px;
|
|
|
|
+ margin-right: 0.375rem;
|
|
width: 20px;
|
|
width: 20px;
|
|
height: 20px;
|
|
height: 20px;
|
|
|
|
+ width: 1.25rem;
|
|
|
|
+ height: 1.25rem;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
.login-btn {
|
|
.login-btn {
|
|
width: 76px;
|
|
width: 76px;
|
|
|
|
+ width: 4.75rem;
|
|
height: 30px;
|
|
height: 30px;
|
|
|
|
+ height: 1.875rem;
|
|
background: #000000;
|
|
background: #000000;
|
|
border-radius: 6px;
|
|
border-radius: 6px;
|
|
|
|
+ border-radius: 0.375rem;
|
|
text-align: center;
|
|
text-align: center;
|
|
color: #fff;
|
|
color: #fff;
|
|
line-height: 30px;
|
|
line-height: 30px;
|
|
|
|
+ line-height: 1.875rem;
|
|
cursor: pointer;
|
|
cursor: pointer;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -157,8 +197,10 @@ const { textLinkList, textLinkList2, handleTextLinkClick } = useLinkList()
|
|
|
|
|
|
.text-link__item {
|
|
.text-link__item {
|
|
padding-right: 30px;
|
|
padding-right: 30px;
|
|
|
|
+ padding-right: 1.875rem;
|
|
color: #767676;
|
|
color: #767676;
|
|
font-size: 14px;
|
|
font-size: 14px;
|
|
|
|
+ font-size: 0.875rem;
|
|
text-transform: uppercase;
|
|
text-transform: uppercase;
|
|
cursor: pointer;
|
|
cursor: pointer;
|
|
}
|
|
}
|
|
@@ -169,7 +211,7 @@ const { textLinkList, textLinkList2, handleTextLinkClick } = useLinkList()
|
|
}
|
|
}
|
|
|
|
|
|
.subnav__right .text-link__item {
|
|
.subnav__right .text-link__item {
|
|
- padding: 0 0 0 30px;
|
|
|
|
|
|
+ padding: 0 0 0 1.875rem;
|
|
}
|
|
}
|
|
|
|
|
|
.nav-menus {
|
|
.nav-menus {
|
|
@@ -180,9 +222,12 @@ const { textLinkList, textLinkList2, handleTextLinkClick } = useLinkList()
|
|
justify-content: center;
|
|
justify-content: center;
|
|
align-items: center;
|
|
align-items: center;
|
|
width: 46px;
|
|
width: 46px;
|
|
|
|
+ width: 2.875rem;
|
|
height: 38px;
|
|
height: 38px;
|
|
|
|
+ height: 2.375rem;
|
|
border: 1px solid #cfcfcf;
|
|
border: 1px solid #cfcfcf;
|
|
border-radius: 6px;
|
|
border-radius: 6px;
|
|
|
|
+ border-radius: 0.375rem;
|
|
cursor: pointer;
|
|
cursor: pointer;
|
|
}
|
|
}
|
|
}
|
|
}
|