From bd38da01db1897b61a54148232a21b0e79b5c129 Mon Sep 17 00:00:00 2001 From: wangjiahao <1522128093@qq.com> Date: Wed, 28 Sep 2022 15:18:43 +0800 Subject: [PATCH 1/3] =?UTF-8?q?refactor:=20=E4=BC=98=E5=8C=96=E5=AD=97?= =?UTF-8?q?=E4=BD=93=E5=A4=A7=E5=B0=8F=E9=99=90=E5=88=B6=EF=BC=8C=E9=98=B2?= =?UTF-8?q?=E6=AD=A2=E8=BF=87=E6=BB=A4=E7=BB=84=E4=BB=B6=E6=A0=87=E9=A2=98?= =?UTF-8?q?=E8=A2=AB=E9=9A=90=E8=97=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/components/canvas/utils/style.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/frontend/src/components/canvas/utils/style.js b/frontend/src/components/canvas/utils/style.js index 116d37ba14..35fafa9bff 100644 --- a/frontend/src/components/canvas/utils/style.js +++ b/frontend/src/components/canvas/utils/style.js @@ -35,6 +35,9 @@ export function getStyle(style, filter = []) { if (key === 'backgroundColor') { result[key] = colorRgb(style[key], style.opacity) } + if(key=== 'fontSize' && result[key] < 12){ + result[key] = 12 + } if (needUnit.includes(key)) { result[key] += 'px' } From d74cd5ba638d40080c6077dd9675b79095fd2651 Mon Sep 17 00:00:00 2001 From: wangjiahao <1522128093@qq.com> Date: Wed, 28 Sep 2022 15:23:50 +0800 Subject: [PATCH 2/3] =?UTF-8?q?refactor:=20=E4=BC=98=E5=8C=96=E5=AD=97?= =?UTF-8?q?=E4=BD=93=E5=A4=A7=E5=B0=8F=E9=99=90=E5=88=B6=EF=BC=8C=E9=98=B2?= =?UTF-8?q?=E6=AD=A2=E8=BF=87=E6=BB=A4=E7=BB=84=E4=BB=B6=E6=A0=87=E9=A2=98?= =?UTF-8?q?=E8=A2=AB=E9=9A=90=E8=97=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/components/canvas/utils/style.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/frontend/src/components/canvas/utils/style.js b/frontend/src/components/canvas/utils/style.js index 35fafa9bff..538a9e05f2 100644 --- a/frontend/src/components/canvas/utils/style.js +++ b/frontend/src/components/canvas/utils/style.js @@ -1,6 +1,7 @@ import { sin, cos } from '@/components/canvas/utils/translate' import store from '@/store' import Vue from 'vue' + export const LIGHT_THEME_COLOR_MAIN = '#000000' export const LIGHT_THEME_COLOR_SLAVE1 = '#CCCCCC' export const LIGHT_THEME_PANEL_BACKGROUND = '#F1F3F5' @@ -35,7 +36,7 @@ export function getStyle(style, filter = []) { if (key === 'backgroundColor') { result[key] = colorRgb(style[key], style.opacity) } - if(key=== 'fontSize' && result[key] < 12){ + if (key === 'fontSize' && result[key] < 12) { result[key] = 12 } if (needUnit.includes(key)) { From 36ad92d06b4d6a59299dc5eb6f0c8da5f268e8ed Mon Sep 17 00:00:00 2001 From: wangjiahao <1522128093@qq.com> Date: Wed, 28 Sep 2022 15:42:55 +0800 Subject: [PATCH 3/3] =?UTF-8?q?fix(=E4=BB=AA=E8=A1=A8=E6=9D=BF):=20?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E8=BE=85=E5=8A=A9=E7=BD=91=E6=A0=BC=E5=BC=80?= =?UTF-8?q?=E5=90=AF=E6=8C=89=E9=92=AE=E7=8A=B6=E6=80=81=E6=98=BE=E7=A4=BA?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/components/canvas/components/Toolbar.vue | 5 +++++ frontend/src/views/panel/edit/index.vue | 2 ++ 2 files changed, 7 insertions(+) diff --git a/frontend/src/components/canvas/components/Toolbar.vue b/frontend/src/components/canvas/components/Toolbar.vue index 44096977d0..4cbddbe300 100644 --- a/frontend/src/components/canvas/components/Toolbar.vue +++ b/frontend/src/components/canvas/components/Toolbar.vue @@ -193,6 +193,7 @@ export default { ]) }, created() { + eventBus.$on('editPanelInitReady', this.editPanelInit) eventBus.$on('preview', this.preview) eventBus.$on('save', this.save) eventBus.$on('clearCanvas', this.clearCanvas) @@ -205,10 +206,14 @@ export default { eventBus.$off('preview', this.preview) eventBus.$off('save', this.save) eventBus.$off('clearCanvas', this.clearCanvas) + eventBus.$off('editPanelInitReady', this.editPanelInit) clearInterval(this.timer) this.timer = null }, methods: { + editPanelInit(){ + this.showGridSwitch = this.canvasStyleData.aidedDesign.showGrid + }, close() { // 关闭页面清理缓存 this.$store.commit('initCanvasBase') diff --git a/frontend/src/views/panel/edit/index.vue b/frontend/src/views/panel/edit/index.vue index 038c39dee8..d037fc2db6 100644 --- a/frontend/src/views/panel/edit/index.vue +++ b/frontend/src/views/panel/edit/index.vue @@ -429,6 +429,7 @@ import ChartStyleBatchSet from '@/views/chart/view/ChartStyleBatchSet' import Multiplexing from '@/views/panel/ViewSelect/multiplexing' import { listenGlobalKeyDown } from '@/components/canvas/utils/shortcutKey' import { adaptCurThemeCommonStyle } from '@/components/canvas/utils/style' +import eventBus from '@/components/canvas/utils/eventBus' export default { name: 'PanelEdit', components: { @@ -794,6 +795,7 @@ export default { } else { _this.$store.commit('refreshSaveStatus') } + eventBus.$emit('editPanelInitReady') }, 500) }) },