From 736af280fd9ea31e647dbc31d289f78ae832d90b Mon Sep 17 00:00:00 2001 From: ulleo Date: Tue, 1 Apr 2025 10:32:43 +0800 Subject: [PATCH] =?UTF-8?q?feat(=E5=9B=BE=E8=A1=A8):=20=E6=95=B0=E5=80=BC?= =?UTF-8?q?=E6=A0=BC=E5=BC=8F=E5=8C=96=E5=86=85=EF=BC=8C=E6=95=B0=E9=87=8F?= =?UTF-8?q?=E5=8D=95=E4=BD=8D=E6=94=AF=E6=8C=81=E9=85=8D=E7=BD=AE=E8=8B=B1?= =?UTF-8?q?=E6=96=87=E7=AE=80=E7=A7=B0=20#14335?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../editor/editor-style/components/LabelSelector.vue | 4 ++++ .../editor-style/components/TooltipSelector.vue | 11 +++++++---- 2 files changed, 11 insertions(+), 4 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 275b05b01c..886fea8921 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 @@ -1079,6 +1079,7 @@ const isProgressBar = computed(() => { :class="'form-item-' + themes" > { :class="'form-item-' + themes" > { :class="'form-item-' + themes" > { :class="'form-item-' + themes" > { formatter.splice(0, formatter.length) const axisIds = [] quotaAxis.value.forEach(axis => { + initFormatCfgUnit(axis.formatterCfg) formatter.push({ ...axis, show: true @@ -77,6 +78,7 @@ const changeChartType = () => { }) quotaData.value.forEach(quotaAxis => { if (!axisIds.includes(quotaAxis.id)) { + initFormatCfgUnit(quotaAxis.formatterCfg) formatter.push({ ...quotaAxis, seriesId: quotaAxis.id, @@ -248,9 +250,6 @@ const init = () => { const customAttr = JSON.parse(JSON.stringify(chart.customAttr)) if (customAttr.tooltip) { state.tooltipForm = defaultsDeep(customAttr.tooltip, cloneDeep(DEFAULT_TOOLTIP)) - //初始化format单位语言 - initFormatCfgUnit(state.tooltipForm.tooltipFormatter) - formatterSelector.value?.blur() // 新增图表 const formatter = state.tooltipForm.seriesTooltipFormatter @@ -260,7 +259,7 @@ const init = () => { return } formatter.forEach(f => { - initFormatCfgUnit(f) + initFormatCfgUnit(f.formatterCfg) }) const seriesAxisMap = formatter.reduce((pre, next) => { next.seriesId = next.seriesId ?? next.id @@ -617,6 +616,7 @@ onMounted(() => { :class="'form-item-' + themes" > { :class="'form-item-' + themes" >