From e74744f49a0c3a487d7435f0b673b14de49f06fd Mon Sep 17 00:00:00 2001 From: FairyEver <1711467488@qq.com> Date: Sat, 17 Aug 2019 17:24:53 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E5=96=84=E5=9B=BD=E9=99=85=E5=8C=96?= =?UTF-8?q?=E7=9A=84=E6=8F=90=E7=A4=BA=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Former-commit-id: a12931143ccd14977e5e6665cc325b28f1e1f9e1 [formerly a12931143ccd14977e5e6665cc325b28f1e1f9e1 [formerly a12931143ccd14977e5e6665cc325b28f1e1f9e1 [formerly a12931143ccd14977e5e6665cc325b28f1e1f9e1 [formerly bf39a4fc45d5365eef5a7546fdb0a75d81529163 [formerly aa2fc33a8844c5913db69b061db6e781250a1b31]]]]] Former-commit-id: 71f2896e93f3f93378832aac832db8c64cda4763 Former-commit-id: 1dba4a4ac571a992f5d05e0942c105ec09b622d6 Former-commit-id: 6eccf026406742594f10ec7f2e98e1959c812d88 [formerly d8173e947af2ac49e1a04b707e6b55e9a9b74450] Former-commit-id: b4bcf0dc36ab076ffb0ed0a1c35a581c08e8afe0 Former-commit-id: 9233f38f248547ea9c317904e15254990737d070 Former-commit-id: 510d59701f174a2cc0e4d388766159213c42f0bb Former-commit-id: e24ad2163ca606a37cc847f830f0360704abe95b Former-commit-id: 0557ac2f138d57e7187fbb6c2d5e8d5968d765c0 --- .../components/header-locales/index.vue | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/src/layout/header-aside/components/header-locales/index.vue b/src/layout/header-aside/components/header-locales/index.vue index 5b6fd3c5..a5fd389e 100644 --- a/src/layout/header-aside/components/header-locales/index.vue +++ b/src/layout/header-aside/components/header-locales/index.vue @@ -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} ]`, + `仅提供切换功能,没有配置具体的语言数据 `, + `文档参考:《国际化 | D2Admin》` + ].join('
') + } this.$notify({ - title: '提示', + title: '语言变更', dangerouslyUseHTMLString: true, - message: `当前语言:${this.$t('_name')} [ ${this.$i18n.locale} ]
仅提供切换功能,没有具体的语言设置` + message }) } - } + } }