forked from mt-fe-group/mt-yd-ui
update 基本完成国际化
This commit is contained in:
@@ -42,12 +42,13 @@
|
||||
</el-form>
|
||||
</div>
|
||||
<div class="login-footer">
|
||||
<p>
|
||||
<a href="http://demo.open.renren.io/renren-security" target="_blank">{{ $t('login.demo') }}</a>
|
||||
<p style="background: #ececec99; border-radius: 8px;">
|
||||
<el-button style="background: none; color: #fff; border: unset; outline: unset; cursor: pointer;" @click="chLang('zh')">中文</el-button> |
|
||||
<el-button style="background: none; color: #fff; border: unset; outline: unset; cursor: pointer;" @click="chLang('en')">English</el-button>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<a href="https://www.renren.io/" target="_blank">{{ $t('login.copyright') }}</a>
|
||||
2022 © renren.io
|
||||
{{ $t('login.copyright') }}
|
||||
</p>
|
||||
</div>
|
||||
</main>
|
||||
@@ -86,6 +87,18 @@ export default {
|
||||
// this.getCaptcha()
|
||||
},
|
||||
methods: {
|
||||
chLang(lang) {
|
||||
switch (lang) {
|
||||
case 'zh':
|
||||
this.$root.$i18n.locale = 'zh-CN'
|
||||
// location.reload()
|
||||
break
|
||||
case 'en':
|
||||
this.$root.$i18n.locale = 'en'
|
||||
location.reload()
|
||||
break
|
||||
}
|
||||
},
|
||||
// 获取验证码
|
||||
getCaptcha() {
|
||||
this.dataForm.uuid = getUUID()
|
||||
|
||||
Reference in New Issue
Block a user