Former-commit-id: bb6f09e83ff6e530a4bf49d46c6b0d1168a93246
This commit is contained in:
FairyEver
2019-09-25 16:13:46 +08:00
parent 0112b7d514
commit 0304d22852
10 changed files with 88 additions and 31 deletions
+20
View File
@@ -0,0 +1,20 @@
export default {
methods: {
onChangeLocale (command) {
this.$i18n.locale = command
let message = `当前语言:${this.$t('_name')} [ ${this.$i18n.locale} ]`
if (['TRAVIS', 'NETLIFY'].includes(process.env.VUE_APP_BUILD_MODE)) {
message = [
`当前语言:${this.$t('_name')} [ ${this.$i18n.locale} ]`,
`仅提供切换功能,没有配置具体的语言数据 `,
`文档参考:<a class="el-link el-link--primary is-underline" target="_blank" href="https://doc.d2admin.fairyever.com/zh/sys-locales/">《国际化 | D2Admin》</a>`
].join('<br/>')
}
this.$notify({
title: '语言变更',
dangerouslyUseHTMLString: true,
message
})
}
}
}