From 6f426425c1016967509632d428576514c6135eba Mon Sep 17 00:00:00 2001
From: FairyEver <1711467488@qq.com>
Date: Wed, 25 Sep 2019 15:14:36 +0800
Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E5=8F=96=20layout=20=E5=92=8C?=
=?UTF-8?q?=E7=99=BB=E5=BD=95=E9=A1=B5=E9=9D=A2=E7=9A=84=E5=85=AC=E7=94=A8?=
=?UTF-8?q?=E5=88=87=E6=8D=A2=E8=AF=AD=E8=A8=80=E9=80=BB=E8=BE=91?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Former-commit-id: 43ed6a96bd897366861aed0915b87f2b65df4710 [formerly 43ed6a96bd897366861aed0915b87f2b65df4710 [formerly 43ed6a96bd897366861aed0915b87f2b65df4710 [formerly 43ed6a96bd897366861aed0915b87f2b65df4710 [formerly 777111bc2dbc71b3ff2549572e38e78d3035d9ca [formerly e6ef292ed2b174fc179c662698b564887654b68c]]]]]
Former-commit-id: 509743dec34795b62814f46da3fcdc8b87bc95af
Former-commit-id: 930b9e6713d8330b182e7f9cac621b2179c6515c
Former-commit-id: 95707d671efc130e783bb46a87fbd0ec10f143b6 [formerly 3fa108f2d027a562ac3e81635a815197b42171f1]
Former-commit-id: 9937d0028823f1c4b89d463a1f1f25bbee245d67
Former-commit-id: 525670c8db99a28555c847a506613fa852c7bb50
Former-commit-id: bbb54be5298d9cde045fae85c20b6f91bee642e7
Former-commit-id: c8cbad1e3bad52b4405ab92f490c86475f2d4d76
Former-commit-id: c86e7baad3cd7b82f2a9a121c6fdc84ba8fe2e5f
---
.../components/header-locales/index.vue | 22 ++++---------------
src/locales/mixin.js | 20 +++++++++++++++++
src/store/modules/d2admin/modules/account.js | 2 --
.../system/login/page.vue.REMOVED.git-id | 2 +-
4 files changed, 25 insertions(+), 21 deletions(-)
create mode 100644 src/locales/mixin.js
diff --git a/src/layout/header-aside/components/header-locales/index.vue b/src/layout/header-aside/components/header-locales/index.vue
index 0035dcc2..d59f18a6 100644
--- a/src/layout/header-aside/components/header-locales/index.vue
+++ b/src/layout/header-aside/components/header-locales/index.vue
@@ -19,24 +19,10 @@
diff --git a/src/locales/mixin.js b/src/locales/mixin.js
new file mode 100644
index 00000000..deed8507
--- /dev/null
+++ b/src/locales/mixin.js
@@ -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} ]`,
+ `仅提供切换功能,没有配置具体的语言数据 `,
+ `文档参考:《国际化 | D2Admin》`
+ ].join('
')
+ }
+ this.$notify({
+ title: '语言变更',
+ dangerouslyUseHTMLString: true,
+ message
+ })
+ }
+ }
+}
diff --git a/src/store/modules/d2admin/modules/account.js b/src/store/modules/d2admin/modules/account.js
index a6203600..7cef316c 100644
--- a/src/store/modules/d2admin/modules/account.js
+++ b/src/store/modules/d2admin/modules/account.js
@@ -70,8 +70,6 @@ export default {
if (confirm) {
commit('d2admin/gray/set', true, { root: true })
MessageBox.confirm('确定要注销当前用户吗', '注销用户', {
- confirmButtonText: '确定',
- cancelButtonText: '取消',
type: 'warning'
})
.then(() => {
diff --git a/src/views/system/login/page.vue.REMOVED.git-id b/src/views/system/login/page.vue.REMOVED.git-id
index 83a0697c..344aa665 100644
--- a/src/views/system/login/page.vue.REMOVED.git-id
+++ b/src/views/system/login/page.vue.REMOVED.git-id
@@ -1 +1 @@
-993e8039f53a8c7eceba1fbf441b887545d29a41
\ No newline at end of file
+1233019702184e7285e070b183c86ba6f3fb4be0
\ No newline at end of file