From 4da24c0cf53c5198a94f1518b2be5ec21ca0e6ea Mon Sep 17 00:00:00 2001 From: wangjiahao <1522128093@qq.com> Date: Sat, 9 Oct 2021 13:58:31 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20=E6=9B=B4=E6=94=B9=E7=9F=A9?= =?UTF-8?q?=E9=98=B5=E8=AE=BE=E8=AE=A1=E6=8C=89=E9=92=AE=E4=BD=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../canvas/components/Editor/index.vue | 4 ++-- .../src/components/canvas/components/Toolbar.vue | 16 ++++++++-------- frontend/src/lang/en.js | 1 + frontend/src/lang/tw.js | 3 ++- frontend/src/lang/zh.js | 3 ++- .../src/views/panel/SubjectSetting/index.vue | 15 +++++++++++++++ 6 files changed, 30 insertions(+), 12 deletions(-) diff --git a/frontend/src/components/canvas/components/Editor/index.vue b/frontend/src/components/canvas/components/Editor/index.vue index 45eb109952..d803bb9ccf 100644 --- a/frontend/src/components/canvas/components/Editor/index.vue +++ b/frontend/src/components/canvas/components/Editor/index.vue @@ -15,9 +15,9 @@ @scroll="canvasScroll" > - + - + diff --git a/frontend/src/components/canvas/components/Toolbar.vue b/frontend/src/components/canvas/components/Toolbar.vue index c87a5a95d3..b980c6afad 100644 --- a/frontend/src/components/canvas/components/Toolbar.vue +++ b/frontend/src/components/canvas/components/Toolbar.vue @@ -13,10 +13,10 @@
-
- - {{ $t('panel.matrix_design') }} -
+ + + + @@ -202,12 +202,12 @@ export default { compose() { this.$store.commit('compose') - this.$store.commit('recordSnapshot','compose') + this.$store.commit('recordSnapshot', 'compose') }, decompose() { this.$store.commit('decompose') - this.$store.commit('recordSnapshot','decompose') + this.$store.commit('recordSnapshot', 'decompose') }, undo() { @@ -255,7 +255,7 @@ export default { } }) - this.$store.commit('recordSnapshot','handleFileChange') + this.$store.commit('recordSnapshot', 'handleFileChange') } img.src = fileResult @@ -294,7 +294,7 @@ export default { clearCanvas() { this.$store.commit('setComponentData', []) this.$store.commit('setCanvasStyle', DEFAULT_COMMON_CANVAS_STYLE_STRING) - this.$store.commit('recordSnapshot','clearCanvas') + this.$store.commit('recordSnapshot', 'clearCanvas') }, handlePreviewChange() { diff --git a/frontend/src/lang/en.js b/frontend/src/lang/en.js index 9fc3f8333b..87f144a38a 100644 --- a/frontend/src/lang/en.js +++ b/frontend/src/lang/en.js @@ -1314,6 +1314,7 @@ export default { no_drill_field: 'Miss relation field', matrix: 'matrix', suspension: 'suspension', + new_element_distribution: 'New element Distribution', subject_no_edit: 'System Subject Can Not Edit', subject_name_not_null: 'Subject Name Can Not Be Null And Less Than 20 charts' }, diff --git a/frontend/src/lang/tw.js b/frontend/src/lang/tw.js index 86fd67b41e..5828303b8e 100644 --- a/frontend/src/lang/tw.js +++ b/frontend/src/lang/tw.js @@ -1315,8 +1315,9 @@ export default { details: '詳情', setting: '設置', no_drill_field: '缺少關聯字段', - matrix: '矩阵分布', + matrix: '矩阵', suspension: '悬浮', + new_element_distribution: '新元素分布方式', subject_no_edit: '系统主题不能修改', subject_name_not_null: '主题名称需要1~20字符' }, diff --git a/frontend/src/lang/zh.js b/frontend/src/lang/zh.js index ae1ff51b07..e90e886d72 100644 --- a/frontend/src/lang/zh.js +++ b/frontend/src/lang/zh.js @@ -1320,8 +1320,9 @@ export default { details: '详情', setting: '设置', no_drill_field: '缺少关联字段', - matrix: '矩阵分布', + matrix: '矩阵', suspension: '悬浮', + new_element_distribution: '新元素分布方式', subject_no_edit: '系统主题不能修改', subject_name_not_null: '主题名称需要1~20字符' }, diff --git a/frontend/src/views/panel/SubjectSetting/index.vue b/frontend/src/views/panel/SubjectSetting/index.vue index dc8533b892..5f45741582 100644 --- a/frontend/src/views/panel/SubjectSetting/index.vue +++ b/frontend/src/views/panel/SubjectSetting/index.vue @@ -9,6 +9,18 @@
+ + {{ $t('panel.new_element_distribution') }}: + + + + {{ $t('panel.matrix') }} + + + {{ $t('panel.suspension') }} + + + @@ -139,6 +151,9 @@ export default { canvasStyleData.chart = chart this.$store.commit('setCanvasStyle', canvasStyleData) this.$store.commit('recordSnapshot', 'save') + }, + styleChange() { + this.$store.state.styleChangeTimes++ } } }