Skip to content

Commit

Permalink
fix: 语言切换不符合规范 TencentBlueKing#3156
Browse files Browse the repository at this point in the history
# Reviewed, transaction id: 13732
  • Loading branch information
hLinx committed Aug 1, 2024
1 parent 89330b0 commit 388f69d
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions src/frontend/src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -47,21 +47,21 @@
<div slot="content">
<div
class="item"
:class="{ active: currentLangType === 'lang-en' }"
@click="handleToggleLang('en')">
:class="{ active: currentLangType === 'lang-zh' }"
@click="handleToggleLang('zh-CN')">
<icon
class="lang-flag"
type="lang-en" />
<span>English</span>
type="lang-zh" />
<span>中文</span>
</div>
<div
class="item"
:class="{ active: currentLangType === 'lang-zh' }"
@click="handleToggleLang('zh-CN')">
:class="{ active: currentLangType === 'lang-en' }"
@click="handleToggleLang('en')">
<icon
class="lang-flag"
type="lang-zh" />
<span>中文</span>
type="lang-en" />
<span>English</span>
</div>
</div>
</bk-popover>
Expand Down Expand Up @@ -248,7 +248,7 @@
handleToggleLang(lang) {
Cookie.remove('blueking_language', { path: '' });
Cookie.set('blueking_language', lang.toLocaleLowerCase(), {
expires: 3600,
expires: 365,
domain: this.envConfig.bkDomain,
});
setLocale(lang);
Expand Down

0 comments on commit 388f69d

Please sign in to comment.