From 93172384ac0c2a9ec39b165f8daa2c62dab27745 Mon Sep 17 00:00:00 2001 From: jianneng-fit2cloud Date: Mon, 4 Nov 2024 20:04:53 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E5=9B=BE=E8=A1=A8):=20=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=E7=AC=A6=E5=8F=B7=E5=9C=B0=E5=9B=BE=E5=A4=A7=E5=B0=8F=E5=8C=BA?= =?UTF-8?q?=E9=97=B4=E8=BE=93=E5=85=A5=E6=A0=A1=E9=AA=8C=E5=AD=98=E5=9C=A8?= =?UTF-8?q?=E6=A0=A1=E9=AA=8C=E9=94=99=E8=AF=AF=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../editor-style/components/BasicStyleSelector.vue | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/core/core-frontend/src/views/chart/components/editor/editor-style/components/BasicStyleSelector.vue b/core/core-frontend/src/views/chart/components/editor/editor-style/components/BasicStyleSelector.vue index a969049324..95356b2910 100644 --- a/core/core-frontend/src/views/chart/components/editor/editor-style/components/BasicStyleSelector.vue +++ b/core/core-frontend/src/views/chart/components/editor/editor-style/components/BasicStyleSelector.vue @@ -309,13 +309,12 @@ const customSymbolicMapSizeRange = computed(() => { return ['symbolic-map'].includes(props.chart.type) && extBubble?.length > 0 }) const mapCustomRangeValidate = prop => { - if (!state.basicStyleForm.mapSymbolSizeMin || state.basicStyleForm.mapSymbolSizeMin < 0) { - state.basicStyleForm.mapSymbolSizeMin = 0 - } - if (!state.basicStyleForm.mapSymbolSizeMax || state.basicStyleForm.mapSymbolSizeMax < 1) { - state.basicStyleForm.mapSymbolSizeMax = 1 - } - if (state.basicStyleForm.mapSymbolSizeMax < state.basicStyleForm.mapSymbolSizeMin) { + const { mapSymbolSizeMax = '0', mapSymbolSizeMin = '1' } = state.basicStyleForm + let max = parseInt(mapSymbolSizeMax) + let min = parseInt(mapSymbolSizeMin) + state.basicStyleForm.mapSymbolSizeMin = Math.max(min, 0) + state.basicStyleForm.mapSymbolSizeMax = Math.max(max, 1) + if (max < min) { ElMessage.warning('第二个区间值必须大于第一个区间值') return }