完善国际化的提示信息
This commit is contained in:
parent
bcb2c35dfd
commit
2f18ca6f7c
|
|
@ -23,12 +23,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: '提示',
|
||||
title: '语言变更',
|
||||
dangerouslyUseHTMLString: true,
|
||||
message: `当前语言:${this.$t('_name')} [ ${this.$i18n.locale} ]<br/>仅提供切换功能,没有具体的语言设置`
|
||||
message
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
|
|
|||
Loading…
Reference in New Issue