首页更新
This commit is contained in:
parent
982c5b809d
commit
64893f1a49
@ -28,20 +28,15 @@
|
|||||||
</nav>
|
</nav>
|
||||||
|
|
||||||
<div class="user-actions">
|
<div class="user-actions">
|
||||||
<el-dropdown class="lang-switch" trigger="click">
|
<span
|
||||||
<button type="button" class="lang-switch-btn">
|
class="nav-lang-text"
|
||||||
{{ currentLocaleLabel }}
|
:class="{ 'is-en': activeLocale === 'en-US' }"
|
||||||
<i class="el-icon-arrow-down"></i>
|
id="lang-toggle"
|
||||||
</button>
|
:title="langToggleTitle"
|
||||||
<el-dropdown-menu slot="dropdown" class="lang-switch-menu">
|
@click="toggleLanguage"
|
||||||
<el-dropdown-item :class="{ 'is-active': activeLocale === 'zh-CN' }" @click.native="switchLocale('zh-CN')">
|
>
|
||||||
中文
|
<span id="lang-text">{{ langToggleText }}</span>
|
||||||
</el-dropdown-item>
|
</span>
|
||||||
<el-dropdown-item :class="{ 'is-active': activeLocale === 'en-US' }" @click.native="switchLocale('en-US')">
|
|
||||||
English
|
|
||||||
</el-dropdown-item>
|
|
||||||
</el-dropdown-menu>
|
|
||||||
</el-dropdown>
|
|
||||||
<i v-if="loginState" class="iconfont icon-xiaoxi functions" @click="handleMessageClick"></i>
|
<i v-if="loginState" class="iconfont icon-xiaoxi functions" @click="handleMessageClick"></i>
|
||||||
<button v-if="loginState" type="button" class="console-link" @click="goB">{{ $t('topbar.console') }}</button>
|
<button v-if="loginState" type="button" class="console-link" @click="goB">{{ $t('topbar.console') }}</button>
|
||||||
|
|
||||||
@ -415,8 +410,11 @@ export default Vue.extend({
|
|||||||
return this.$route.path === '/tokenMarket' ||
|
return this.$route.path === '/tokenMarket' ||
|
||||||
(this.$route.path === '/product' && ['TOKEN市集', 'Token市集', 'token市集'].includes(category))
|
(this.$route.path === '/product' && ['TOKEN市集', 'Token市集', 'token市集'].includes(category))
|
||||||
},
|
},
|
||||||
currentLocaleLabel() {
|
langToggleText() {
|
||||||
return this.activeLocale === 'en-US' ? 'English' : '中文'
|
return this.activeLocale === 'en-US' ? 'EN/中' : '中/EN'
|
||||||
|
},
|
||||||
|
langToggleTitle() {
|
||||||
|
return this.activeLocale === 'en-US' ? 'Switch to Chinese' : '切换到英文'
|
||||||
},
|
},
|
||||||
aiPanelStyle() {
|
aiPanelStyle() {
|
||||||
if (this.aiPanelPosition.left === null || this.aiPanelPosition.top === null) {
|
if (this.aiPanelPosition.left === null || this.aiPanelPosition.top === null) {
|
||||||
@ -942,8 +940,8 @@ export default Vue.extend({
|
|||||||
this.$router.push('/homePage/index');
|
this.$router.push('/homePage/index');
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
switchLocale(locale) {
|
toggleLanguage() {
|
||||||
if (!locale || locale === this.activeLocale) return
|
const locale = this.activeLocale === 'en-US' ? 'zh-CN' : 'en-US'
|
||||||
setLocale(locale)
|
setLocale(locale)
|
||||||
this.activeLocale = locale
|
this.activeLocale = locale
|
||||||
this.$message.success(
|
this.$message.success(
|
||||||
@ -1058,26 +1056,27 @@ export default Vue.extend({
|
|||||||
font-size: 15px !important;
|
font-size: 15px !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.lang-switch-btn {
|
.nav-lang-text {
|
||||||
height: 32px;
|
color: #111827;
|
||||||
padding: 0 10px;
|
|
||||||
border: 1px solid rgba(110, 118, 140, 0.35);
|
|
||||||
border-radius: 8px;
|
|
||||||
background: rgba(255, 255, 255, 0.65);
|
|
||||||
color: #333;
|
|
||||||
display: inline-flex;
|
display: inline-flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
gap: 6px;
|
justify-content: center;
|
||||||
font-size: 13px !important;
|
font-size: 16px !important;
|
||||||
|
font-weight: 600;
|
||||||
|
//line-height: 1;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
transition: all 0.2s ease;
|
user-select: none;
|
||||||
|
transition: color 0.2s ease;
|
||||||
|
|
||||||
&:hover {
|
&:hover {
|
||||||
color: #1E6FFF;
|
color: #1e6fff;
|
||||||
border-color: rgba(30, 111, 255, 0.45);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.nav-lang-text.is-en {
|
||||||
|
color: #1e6fff;
|
||||||
|
}
|
||||||
|
|
||||||
.user-actions {
|
.user-actions {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
@ -1120,7 +1119,7 @@ export default Vue.extend({
|
|||||||
background: transparent;
|
background: transparent;
|
||||||
color: #333;
|
color: #333;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
font-size: 17px !important;
|
font-size: 16px !important;
|
||||||
font-weight: 700;
|
font-weight: 700;
|
||||||
// line-height: 36px
|
// line-height: 36px
|
||||||
transition: color 0.2s ease;
|
transition: color 0.2s ease;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user