From 5cfc7b0cac30b8c996c5a97f0a66fe9aba860094 Mon Sep 17 00:00:00 2001 From: junjie Date: Thu, 27 May 2021 10:50:27 +0800 Subject: [PATCH] =?UTF-8?q?feat(frontend):=E4=BB=AA=E8=A1=A8=E6=9D=BF?= =?UTF-8?q?=E5=88=86=E4=BA=AB=E6=8A=A5=E9=94=99fix?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/lang/en.js | 4 +++- frontend/src/lang/tw.js | 4 +++- frontend/src/lang/zh.js | 3 ++- frontend/src/views/panel/GrantAuth/dept/index.vue | 4 ++-- frontend/src/views/panel/GrantAuth/index.vue | 2 +- frontend/src/views/panel/GrantAuth/role/index.vue | 4 ++-- frontend/src/views/panel/GrantAuth/user/index.vue | 6 +++--- 7 files changed, 16 insertions(+), 11 deletions(-) diff --git a/frontend/src/lang/en.js b/frontend/src/lang/en.js index 5ce5dfb5ba..5e8218c9f4 100644 --- a/frontend/src/lang/en.js +++ b/frontend/src/lang/en.js @@ -277,7 +277,9 @@ export default { select_module: 'Select Module', default_module: 'Default Module' }, - datasource: 'Datasource' + datasource: 'Datasource', + char_can_not_more_50: 'Name can not more 50 char', + share_success: 'Share Success' }, documentation: { documentation: 'Documentation', diff --git a/frontend/src/lang/tw.js b/frontend/src/lang/tw.js index 8ce56d835c..321ce72041 100644 --- a/frontend/src/lang/tw.js +++ b/frontend/src/lang/tw.js @@ -276,7 +276,9 @@ export default { select_module: '選擇模块', default_module: '默认模块' }, - datasource: '數據源' + datasource: '數據源', + char_can_not_more_50: '名稱不能超過50字符', + share_success: '分享成功' }, documentation: { documentation: '文檔', diff --git a/frontend/src/lang/zh.js b/frontend/src/lang/zh.js index d1355b9e8c..ec31d7d3e9 100644 --- a/frontend/src/lang/zh.js +++ b/frontend/src/lang/zh.js @@ -278,7 +278,8 @@ export default { default_module: '默认模块' }, datasource: '数据连接', - char_can_not_more_50: '名称不能超过50字符' + char_can_not_more_50: '名称不能超过50字符', + share_success: '分享成功' }, documentation: { documentation: '文档', diff --git a/frontend/src/views/panel/GrantAuth/dept/index.vue b/frontend/src/views/panel/GrantAuth/dept/index.vue index dc2778b9fd..7aa798bee4 100644 --- a/frontend/src/views/panel/GrantAuth/dept/index.vue +++ b/frontend/src/views/panel/GrantAuth/dept/index.vue @@ -158,11 +158,11 @@ export default { return roots }, - save() { + save(msg) { const rows = this.$refs.table.store.states.selection const request = this.buildRequest(rows) saveShare(request).then(res => { - this.$success(this.$t('commons.save_success')) + this.$success(msg) return true }).catch(err => { this.$error(err.message) diff --git a/frontend/src/views/panel/GrantAuth/index.vue b/frontend/src/views/panel/GrantAuth/index.vue index 6cb0b32129..652f15e7ec 100644 --- a/frontend/src/views/panel/GrantAuth/index.vue +++ b/frontend/src/views/panel/GrantAuth/index.vue @@ -58,7 +58,7 @@ export default { this.showSearchInput = false }, save() { - this.$refs[this.activeName].save() + this.$refs[this.activeName].save(this.$t('commons.share_success')) this.$emit('close-grant', 0) }, cancel() { diff --git a/frontend/src/views/panel/GrantAuth/role/index.vue b/frontend/src/views/panel/GrantAuth/role/index.vue index 3167339bda..5bc0429948 100644 --- a/frontend/src/views/panel/GrantAuth/role/index.vue +++ b/frontend/src/views/panel/GrantAuth/role/index.vue @@ -78,11 +78,11 @@ export default { this.setCheckNodes() }) }, - save() { + save(msg) { const rows = this.$refs.table.store.states.selection const request = this.buildRequest(rows) saveShare(request).then(res => { - this.$success(this.$t('commons.save_success')) + this.$success(msg) return true }).catch(err => { this.$error(err.message) diff --git a/frontend/src/views/panel/GrantAuth/user/index.vue b/frontend/src/views/panel/GrantAuth/user/index.vue index 7ee56ffa87..1329b36988 100644 --- a/frontend/src/views/panel/GrantAuth/user/index.vue +++ b/frontend/src/views/panel/GrantAuth/user/index.vue @@ -86,11 +86,11 @@ export default { }) }, - save() { + save(msg) { const rows = this.$refs.table.store.states.selection const request = this.buildRequest(rows) - saveShare(request).then(res => { - this.$success(this.$t('commons.save_success')) + saveShare(request).then(response => { + this.$success(msg) return true }).catch(err => { this.$error(err.message)