home修改

This commit is contained in:
李志鹏
2026-05-11 13:56:10 +08:00
parent 51e6933f9f
commit 33043eedf1
20 changed files with 340 additions and 414 deletions

View File

@@ -62,6 +62,10 @@
</div>
</template>
</el-popover>
<div class="language" @click="onLanguageClick">
<span :class="{ active: locale === 'CHINESE_SIMPLIFIED' }"></span> /
<span :class="{ active: locale === 'ENGLISH' }">ENG</span>
</div>
</div>
</div>
</template>
@@ -70,6 +74,8 @@
import { computed, ref } from 'vue'
import { useRouter, useRoute } from 'vue-router'
import myEvent from '@/utils/myEvent'
import { useI18n } from 'vue-i18n'
const { t, locale } = useI18n()
const router = useRouter()
const route = useRoute()
const activePath = computed(() => route.path)
@@ -131,6 +137,10 @@
hideProfilePopover()
console.log('logout')
}
const onLanguageClick = () => {
locale.value = locale.value === 'ENGLISH' ? 'CHINESE_SIMPLIFIED' : 'ENGLISH'
localStorage.setItem('language', locale.value)
}
</script>
<style lang="less" scoped>
@@ -159,7 +169,6 @@
height: 2.4rem;
}
> .login {
font-family: Kaisei Opti;
font-size: 1.6rem;
}
> .profile {
@@ -168,6 +177,15 @@
border-radius: 50%;
background: #f5f5f5;
}
> .language {
font-family: KaiseiOpti-Regular;
font-size: 1.6rem;
color: #c2c2c2;
> .active {
color: #232323;
font-family: KaiseiOpti-Medium;
}
}
}
> .center,
> .right {
@@ -195,7 +213,6 @@
font-size: 1.6rem;
color: #232323;
border-bottom: 0.1rem solid transparent;
font-family: Kaisei Opti;
}
&.active {
> span {