Merge branch 'main' of https://gitea-net.fontree.cn/scout666/officialWebsite
This commit is contained in:
commit
f0a16af306
@ -80,6 +80,7 @@ export function useLanguage() {
|
|||||||
locale.value = lang;
|
locale.value = lang;
|
||||||
currentLanguage.value = lang;
|
currentLanguage.value = lang;
|
||||||
localStorage.setItem('language', lang);
|
localStorage.setItem('language', lang);
|
||||||
|
window.location.reload();
|
||||||
};
|
};
|
||||||
|
|
||||||
// 获取浏览器语言
|
// 获取浏览器语言
|
||||||
@ -105,7 +106,9 @@ export function useLanguage() {
|
|||||||
// 初始化语言
|
// 初始化语言
|
||||||
const initLanguage = () => {
|
const initLanguage = () => {
|
||||||
const savedLanguage = localStorage.getItem('language') || getBrowserLanguage();
|
const savedLanguage = localStorage.getItem('language') || getBrowserLanguage();
|
||||||
changeLanguage(savedLanguage);
|
locale.value = savedLanguage;
|
||||||
|
currentLanguage.value = savedLanguage;
|
||||||
|
localStorage.setItem('language', savedLanguage);
|
||||||
};
|
};
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
@ -152,10 +152,12 @@ onUnmounted(() => {
|
|||||||
{{ t("home.nav.businessintroduction") }}
|
{{ t("home.nav.businessintroduction") }}
|
||||||
</div>
|
</div>
|
||||||
<div class="tab-item">
|
<div class="tab-item">
|
||||||
|
<n-popselect v-model:value="currentLanguage" :options="languageOptions"
|
||||||
<n-popselect v-model:value="currentLanguage" :options="languageOptions" trigger="click"
|
|
||||||
@update:value="changeLanguage">
|
@update:value="changeLanguage">
|
||||||
{{ currentLanguageLabel }}
|
<div class="language-display">
|
||||||
|
{{ currentLanguageLabel }}
|
||||||
|
<span class="language-arrow">▼</span>
|
||||||
|
</div>
|
||||||
</n-popselect>
|
</n-popselect>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -665,4 +667,14 @@ onUnmounted(() => {
|
|||||||
[ref*="moveRef"] {
|
[ref*="moveRef"] {
|
||||||
position: relative;
|
position: relative;
|
||||||
}
|
}
|
||||||
|
.language-arrow {
|
||||||
|
font-size: 12px;
|
||||||
|
margin-left: 4px;
|
||||||
|
color: #10263E;
|
||||||
|
transition: transform 0.3s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tab-item:hover .language-arrow {
|
||||||
|
color: #8B59F7;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
@ -152,10 +152,12 @@ onUnmounted(() => {
|
|||||||
{{ t("home.nav.businessintroduction") }}
|
{{ t("home.nav.businessintroduction") }}
|
||||||
</div>
|
</div>
|
||||||
<div class="tab-item">
|
<div class="tab-item">
|
||||||
|
<n-popselect v-model:value="currentLanguage" :options="languageOptions"
|
||||||
<n-popselect v-model:value="currentLanguage" :options="languageOptions" trigger="click"
|
|
||||||
@update:value="changeLanguage">
|
@update:value="changeLanguage">
|
||||||
{{ currentLanguageLabel }}
|
<div class="language-display">
|
||||||
|
{{ currentLanguageLabel }}
|
||||||
|
<span class="language-arrow">▼</span>
|
||||||
|
</div>
|
||||||
</n-popselect>
|
</n-popselect>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -665,4 +667,14 @@ onUnmounted(() => {
|
|||||||
[ref*="moveRef"] {
|
[ref*="moveRef"] {
|
||||||
position: relative;
|
position: relative;
|
||||||
}
|
}
|
||||||
|
.language-arrow {
|
||||||
|
font-size: 12px;
|
||||||
|
margin-left: 4px;
|
||||||
|
color: #10263E;
|
||||||
|
transition: transform 0.3s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tab-item:hover .language-arrow {
|
||||||
|
color: #8B59F7;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
@ -303,10 +303,12 @@ onUnmounted(() => {
|
|||||||
{{ t("home.nav.businessintroduction") }}
|
{{ t("home.nav.businessintroduction") }}
|
||||||
</div>
|
</div>
|
||||||
<div class="tab-item">
|
<div class="tab-item">
|
||||||
|
<n-popselect v-model:value="currentLanguage" :options="languageOptions"
|
||||||
<n-popselect v-model:value="currentLanguage" :options="languageOptions" trigger="click"
|
|
||||||
@update:value="changeLanguage">
|
@update:value="changeLanguage">
|
||||||
{{ currentLanguageLabel }}
|
<div class="language-display">
|
||||||
|
{{ currentLanguageLabel }}
|
||||||
|
<span class="language-arrow">▼</span>
|
||||||
|
</div>
|
||||||
</n-popselect>
|
</n-popselect>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -802,4 +804,14 @@ onUnmounted(() => {
|
|||||||
[ref*="moveRef"] {
|
[ref*="moveRef"] {
|
||||||
position: relative;
|
position: relative;
|
||||||
}
|
}
|
||||||
|
.language-arrow {
|
||||||
|
font-size: 12px;
|
||||||
|
margin-left: 4px;
|
||||||
|
color: #10263E;
|
||||||
|
transition: transform 0.3s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tab-item:hover .language-arrow {
|
||||||
|
color: #8B59F7;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
@ -303,10 +303,12 @@ onUnmounted(() => {
|
|||||||
{{ t("home.nav.businessintroduction") }}
|
{{ t("home.nav.businessintroduction") }}
|
||||||
</div>
|
</div>
|
||||||
<div class="tab-item">
|
<div class="tab-item">
|
||||||
|
<n-popselect v-model:value="currentLanguage" :options="languageOptions"
|
||||||
<n-popselect v-model:value="currentLanguage" :options="languageOptions" trigger="click"
|
|
||||||
@update:value="changeLanguage">
|
@update:value="changeLanguage">
|
||||||
{{ currentLanguageLabel }}
|
<div class="language-display">
|
||||||
|
{{ currentLanguageLabel }}
|
||||||
|
<span class="language-arrow">▼</span>
|
||||||
|
</div>
|
||||||
</n-popselect>
|
</n-popselect>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -802,4 +804,14 @@ onUnmounted(() => {
|
|||||||
[ref*="moveRef"] {
|
[ref*="moveRef"] {
|
||||||
position: relative;
|
position: relative;
|
||||||
}
|
}
|
||||||
|
.language-arrow {
|
||||||
|
font-size: 12px;
|
||||||
|
margin-left: 4px;
|
||||||
|
color: #10263E;
|
||||||
|
transition: transform 0.3s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tab-item:hover .language-arrow {
|
||||||
|
color: #8B59F7;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
@ -35,10 +35,12 @@
|
|||||||
{{ t("home.nav.businessintroduction") }}
|
{{ t("home.nav.businessintroduction") }}
|
||||||
</div>
|
</div>
|
||||||
<div class="tab-item">
|
<div class="tab-item">
|
||||||
|
<n-popselect v-model:value="currentLanguage" :options="languageOptions"
|
||||||
<n-popselect v-model:value="currentLanguage" :options="languageOptions" trigger="click"
|
|
||||||
@update:value="changeLanguage">
|
@update:value="changeLanguage">
|
||||||
{{ currentLanguageLabel }}
|
<div class="language-display">
|
||||||
|
{{ currentLanguageLabel }}
|
||||||
|
<span class="language-arrow">▼</span>
|
||||||
|
</div>
|
||||||
</n-popselect>
|
</n-popselect>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -435,4 +437,14 @@ onUnmounted(() => {});
|
|||||||
// line-height: 110px;
|
// line-height: 110px;
|
||||||
color: #10253e;
|
color: #10253e;
|
||||||
}
|
}
|
||||||
|
.language-arrow {
|
||||||
|
font-size: 12px;
|
||||||
|
margin-left: 4px;
|
||||||
|
color: #10263E;
|
||||||
|
transition: transform 0.3s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tab-item:hover .language-arrow {
|
||||||
|
color: #8B59F7;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
@ -35,10 +35,12 @@
|
|||||||
{{ t("home.nav.businessintroduction") }}
|
{{ t("home.nav.businessintroduction") }}
|
||||||
</div>
|
</div>
|
||||||
<div class="tab-item">
|
<div class="tab-item">
|
||||||
|
<n-popselect v-model:value="currentLanguage" :options="languageOptions"
|
||||||
<n-popselect v-model:value="currentLanguage" :options="languageOptions" trigger="click"
|
|
||||||
@update:value="changeLanguage">
|
@update:value="changeLanguage">
|
||||||
{{ currentLanguageLabel }}
|
<div class="language-display">
|
||||||
|
{{ currentLanguageLabel }}
|
||||||
|
<span class="language-arrow">▼</span>
|
||||||
|
</div>
|
||||||
</n-popselect>
|
</n-popselect>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -435,4 +437,14 @@ onUnmounted(() => {});
|
|||||||
// line-height: 110px;
|
// line-height: 110px;
|
||||||
color: #10253e;
|
color: #10253e;
|
||||||
}
|
}
|
||||||
|
.language-arrow {
|
||||||
|
font-size: 12px;
|
||||||
|
margin-left: 4px;
|
||||||
|
color: #10263E;
|
||||||
|
transition: transform 0.3s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tab-item:hover .language-arrow {
|
||||||
|
color: #8B59F7;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
@ -436,10 +436,12 @@ watch(
|
|||||||
{{ t("home.nav.businessintroduction") }}
|
{{ t("home.nav.businessintroduction") }}
|
||||||
</div>
|
</div>
|
||||||
<div class="tab-item">
|
<div class="tab-item">
|
||||||
|
<n-popselect v-model:value="currentLanguage" :options="languageOptions"
|
||||||
<n-popselect v-model:value="currentLanguage" :options="languageOptions" trigger="click"
|
|
||||||
@update:value="changeLanguage">
|
@update:value="changeLanguage">
|
||||||
{{ currentLanguageLabel }}
|
<div class="language-display">
|
||||||
|
{{ currentLanguageLabel }}
|
||||||
|
<span class="language-arrow">▼</span>
|
||||||
|
</div>
|
||||||
</n-popselect>
|
</n-popselect>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -977,4 +979,14 @@ watch(
|
|||||||
height: 22pxpx;
|
height: 22pxpx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.language-arrow {
|
||||||
|
font-size: 12px;
|
||||||
|
margin-left: 4px;
|
||||||
|
color: #10263E;
|
||||||
|
transition: transform 0.3s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tab-item:hover .language-arrow {
|
||||||
|
color: #8B59F7;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
@ -426,10 +426,12 @@ watch(
|
|||||||
{{ t("home.nav.businessintroduction") }}
|
{{ t("home.nav.businessintroduction") }}
|
||||||
</div>
|
</div>
|
||||||
<div class="tab-item">
|
<div class="tab-item">
|
||||||
|
<n-popselect v-model:value="currentLanguage" :options="languageOptions"
|
||||||
<n-popselect v-model:value="currentLanguage" :options="languageOptions" trigger="click"
|
|
||||||
@update:value="changeLanguage">
|
@update:value="changeLanguage">
|
||||||
{{ currentLanguageLabel }}
|
<div class="language-display">
|
||||||
|
{{ currentLanguageLabel }}
|
||||||
|
<span class="language-arrow">▼</span>
|
||||||
|
</div>
|
||||||
</n-popselect>
|
</n-popselect>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -941,6 +943,22 @@ watch(
|
|||||||
height: 22pxpx;
|
height: 22pxpx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.language-display {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.language-arrow {
|
||||||
|
font-size: 12px;
|
||||||
|
margin-left: 4px;
|
||||||
|
color: #10263E;
|
||||||
|
transition: transform 0.3s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tab-item:hover .language-arrow {
|
||||||
|
color: #8B59F7;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
.n-base-select-option {
|
.n-base-select-option {
|
||||||
|
Loading…
Reference in New Issue
Block a user