From 0ea9d63f76d96521e01b15ae6a4fe54fac1aeb41 Mon Sep 17 00:00:00 2001 From: wisonic-s Date: Mon, 1 Jul 2024 22:39:08 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E5=9B=BE=E8=A1=A8):=20=E8=84=B1=E6=95=8F?= =?UTF-8?q?=E5=AD=97=E6=AE=B5=E4=B8=8D=E5=8F=AF=E7=94=A8=E4=BA=8E=E8=A7=86?= =?UTF-8?q?=E5=9B=BE=E5=88=B6=E4=BD=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../views/chart/components/editor/index.vue | 31 +++++++++++++++++-- 1 file changed, 28 insertions(+), 3 deletions(-) diff --git a/core/core-frontend/src/views/chart/components/editor/index.vue b/core/core-frontend/src/views/chart/components/editor/index.vue index 41fa337712..9d6116b6b0 100644 --- a/core/core-frontend/src/views/chart/components/editor/index.vue +++ b/core/core-frontend/src/views/chart/components/editor/index.vue @@ -262,9 +262,6 @@ const chartStyleShow = computed(() => { }) const chartViewInstance = computed(() => { - if (view.value.render === 'highchart') { - return chartViewManager.getChartView('antv', view.value.type) - } return chartViewManager.getChartView(view.value.render, view.value.type) }) const showAxis = (axis: AxisType) => chartViewInstance.value?.axis?.includes(axis) @@ -559,6 +556,33 @@ const showAggregate = computed(() => { return false }) +const disableUpdate = computed(() => { + let flag = false + if (view.value.type === 'table-info') { + return flag + } + if (!chartViewInstance.value) { + return flag + } + const axisConfig = chartViewInstance.value.axisConfig + if (!axisConfig) { + return flag + } + for (const key in axisConfig) { + if (Object.prototype.hasOwnProperty.call(axisConfig, key)) { + const axis = view.value[key] + if (axis instanceof Array) { + axis.forEach(a => { + if (a.desensitized) { + flag = true + } + }) + } + } + } + return flag +}) + const addAxis = (e, axis: AxisType) => { recordSnapshotInfo('calcData') const axisSpec = chartViewInstance.value?.axisConfig[axis] @@ -2482,6 +2506,7 @@ onMounted(() => {