From 7867d0541d180d07dbdab8fb56a60cd1dbd87ff2 Mon Sep 17 00:00:00 2001 From: wisonic Date: Mon, 22 Jul 2024 15:36:12 +0800 Subject: [PATCH] =?UTF-8?q?refactor(=E5=9B=BE=E8=A1=A8):=20=E6=A0=87?= =?UTF-8?q?=E7=AD=BE=E5=AD=97=E4=BD=93=E5=A4=A7=E5=B0=8F=E7=BB=9F=E4=B8=80?= =?UTF-8?q?=E4=B8=BA12?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../editor/editor-style/components/LabelSelector.vue | 7 +------ .../src/views/chart/components/editor/util/chart.ts | 2 +- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/core/core-frontend/src/views/chart/components/editor/editor-style/components/LabelSelector.vue b/core/core-frontend/src/views/chart/components/editor/editor-style/components/LabelSelector.vue index 599226dca5..993b5c3065 100644 --- a/core/core-frontend/src/views/chart/components/editor/editor-style/components/LabelSelector.vue +++ b/core/core-frontend/src/views/chart/components/editor/editor-style/components/LabelSelector.vue @@ -177,12 +177,7 @@ const changeLabelAttr = prop => { const init = () => { const chart = JSON.parse(JSON.stringify(props.chart)) if (chart.customAttr) { - let customAttr = null - if (Object.prototype.toString.call(chart.customAttr) === '[object Object]') { - customAttr = JSON.parse(JSON.stringify(chart.customAttr)) - } else { - customAttr = JSON.parse(chart.customAttr) - } + const customAttr = chart.customAttr if (customAttr.label) { state.labelForm = defaultsDeep(customAttr.label, cloneDeep(COMPUTED_DEFAULT_LABEL.value)) if (chartType.value === 'liquid' && state.labelForm.fontSize < fontSizeList.value[0].value) { diff --git a/core/core-frontend/src/views/chart/components/editor/util/chart.ts b/core/core-frontend/src/views/chart/components/editor/util/chart.ts index e8a168dc59..e194499235 100644 --- a/core/core-frontend/src/views/chart/components/editor/util/chart.ts +++ b/core/core-frontend/src/views/chart/components/editor/util/chart.ts @@ -277,7 +277,7 @@ export const DEFAULT_LABEL: ChartLabelAttr = { show: false, position: 'top', color: '#909399', - fontSize: 10, + fontSize: 12, formatter: '', labelLine: { show: true