From 8eac87dedd6f7ef79664380a98cede85df1f679a Mon Sep 17 00:00:00 2001 From: jianneng-fit2cloud Date: Wed, 25 Sep 2024 23:31:11 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E8=A7=86=E5=9B=BE):=20=E4=BF=AE=E5=A4=8DK?= =?UTF-8?q?=E7=BA=BF=E5=9B=BE=E6=89=B9=E9=87=8F=E8=B0=83=E6=95=B4=E7=BA=BF?= =?UTF-8?q?=E6=9D=A1=E5=8F=8A=E6=8A=98=E7=82=B9=E6=A0=B7=E5=BC=8F=E6=97=A0?= =?UTF-8?q?=E6=95=88=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/frontend/src/views/chart/chart/util.js | 4 ++-- .../chart/components/shapeAttr/SizeSelectorAntV.vue | 13 ++++++++----- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/core/frontend/src/views/chart/chart/util.js b/core/frontend/src/views/chart/chart/util.js index f577e96c70..340459a379 100644 --- a/core/frontend/src/views/chart/chart/util.js +++ b/core/frontend/src/views/chart/chart/util.js @@ -1746,7 +1746,7 @@ export const TYPE_CONFIGS = [ icon: 'stock-line', properties: [ 'color-selector', - 'size-selector', + 'size-selector-ant-v', 'tooltip-selector-ant-v', 'x-axis-selector-ant-v', 'y-axis-selector-ant-v', @@ -1760,7 +1760,7 @@ export const TYPE_CONFIGS = [ 'customColor', 'alpha' ], - 'size-selector': [ + 'size-selector-ant-v': [ 'lineWidth', 'lineSymbol', 'lineSymbolSize', diff --git a/core/frontend/src/views/chart/components/shapeAttr/SizeSelectorAntV.vue b/core/frontend/src/views/chart/components/shapeAttr/SizeSelectorAntV.vue index 5a63ca5278..668092dd5b 100644 --- a/core/frontend/src/views/chart/components/shapeAttr/SizeSelectorAntV.vue +++ b/core/frontend/src/views/chart/components/shapeAttr/SizeSelectorAntV.vue @@ -1909,23 +1909,23 @@ export default { this.sizeForm.gaugePercentLabel = this.sizeForm.gaugePercentLabel === false ? false : DEFAULT_SIZE.gaugePercentLabel if (this.chart.type !== 'table-pivot') { let { xaxis, yaxis } = this.chart - if (!(xaxis instanceof Object)) { + if (!(xaxis instanceof Object) && xaxis) { xaxis = JSON.parse(xaxis) } - if (!(yaxis instanceof Object)) { + if (!(yaxis instanceof Object) && yaxis) { yaxis = JSON.parse(yaxis) } let allAxis = xaxis if (this.chart.type === 'table-normal') { allAxis = allAxis.concat(yaxis) } - if (allAxis.length && this.sizeForm.showIndex) { + if (allAxis?.length && this.sizeForm.showIndex) { allAxis.unshift({ dataeaseName: SERIES_NUMBER_FIELD, name: this.sizeForm.indexLabel }) } - if (!allAxis.length) { + if (!allAxis?.length) { this.sizeForm.tableFieldWidth?.splice(0) this.fieldColumnWidth.fieldId = '' this.fieldColumnWidth.width = '' @@ -1982,7 +1982,10 @@ export default { }, changeBarSizeCase(modifyName) { if (!this.doChange) { - this.doChange = _.debounce(() => this.debounceChange(modifyName), 200) + this.doChange = _.debounce(() => { + this.debounceChange(modifyName) + this.doChange = undefined + }, 200) } this.doChange() },