From 6961b7932a495a21d97481e01c343624ea07ab51 Mon Sep 17 00:00:00 2001 From: wangjiahao <1522128093@qq.com> Date: Wed, 9 Oct 2024 13:28:04 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E4=BB=AA=E8=A1=A8=E6=9D=BF):=20=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D=E5=9B=A0=E5=BB=B6=E8=BF=9F=E6=89=A7=E8=A1=8C=E5=AF=BC?= =?UTF-8?q?=E8=87=B4=E7=9A=84=E6=8C=87=E6=A0=87=E5=8D=A1=E6=89=B9=E9=87=8F?= =?UTF-8?q?=E6=93=8D=E4=BD=9C=E5=AD=97=E4=BD=93=E5=92=8C=E5=90=8D=E7=A7=B0?= =?UTF-8?q?=E5=8A=A0=E7=B2=97=E5=A4=B1=E6=95=88=E9=97=AE=E9=A2=98=20#11543?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/canvas/customComponent/UserView.vue | 4 ++-- core/frontend/src/store/index.js | 2 +- .../chart/components/shapeAttr/SizeSelector.vue | 13 ++++++++++++- 3 files changed, 15 insertions(+), 4 deletions(-) diff --git a/core/frontend/src/components/canvas/customComponent/UserView.vue b/core/frontend/src/components/canvas/customComponent/UserView.vue index 4828746de0..ac8df39751 100644 --- a/core/frontend/src/components/canvas/customComponent/UserView.vue +++ b/core/frontend/src/components/canvas/customComponent/UserView.vue @@ -878,7 +878,7 @@ export default { if (!sourceCustomAttr[param.property]) { this.$set(sourceCustomAttr, param.property, {}) } - sourceCustomAttr[param.property][param.value.modifyName] = param.value[param.value.modifyName] + Vue.set(sourceCustomAttr[param.property], param.value.modifyName, param.value[param.value.modifyName]) this.sourceCustomAttrStr = JSON.stringify(sourceCustomAttr) this.chart.customAttr = this.sourceCustomAttrStr this.$store.commit('updateComponentViewsData', { @@ -892,7 +892,7 @@ export default { if (param.property === 'margin') { sourceCustomStyle[param.property] = param.value } - sourceCustomStyle[param.property][param.value.modifyName] = param.value[param.value.modifyName] + Vue.set(sourceCustomStyle[param.property], param.value.modifyName, param.value[param.value.modifyName]) this.sourceCustomStyleStr = JSON.stringify(sourceCustomStyle) this.chart.customStyle = this.sourceCustomStyleStr this.$store.commit('updateComponentViewsData', { diff --git a/core/frontend/src/store/index.js b/core/frontend/src/store/index.js index a0fa4c2a1b..52adcbb25e 100644 --- a/core/frontend/src/store/index.js +++ b/core/frontend/src/store/index.js @@ -847,7 +847,7 @@ const data = { } }, setChangeProperties(state, propertyInfo) { - state.changeProperties[propertyInfo.custom][propertyInfo.property] = propertyInfo.value + Vue.set(state.changeProperties[propertyInfo.custom], propertyInfo.property, propertyInfo.value) }, initCanvasBase(state) { this.commit('resetLastValidFilters') diff --git a/core/frontend/src/views/chart/components/shapeAttr/SizeSelector.vue b/core/frontend/src/views/chart/components/shapeAttr/SizeSelector.vue index 8f3e3fd531..a9666866be 100644 --- a/core/frontend/src/views/chart/components/shapeAttr/SizeSelector.vue +++ b/core/frontend/src/views/chart/components/shapeAttr/SizeSelector.vue @@ -1166,6 +1166,7 @@ import { CHART_FONT_FAMILY, CHART_FONT_LETTER_SPACE, DEFAULT_SIZE } from '../../chart/chart' import { includesAny } from '@/utils/StringUtils' import _ from 'lodash' +import {mapState} from "vuex"; export default { name: 'SizeSelector', props: { @@ -1224,6 +1225,11 @@ export default { } } }, + computed: { + ...mapState([ + 'batchOptStatus' + ]) + }, mounted() { this.init() this.initData() @@ -1303,13 +1309,18 @@ export default { this.fontSize = arr }, changeBarSizeCase(modifyName) { + this.currentModifyName = modifyName; if (!this.doChange) { this.doChange = _.debounce(() => this.debounceChange(modifyName), 200) } this.doChange() }, debounceChange(modifyName) { - this.sizeForm['modifyName'] = modifyName + if(this.batchOptStatus){ + this.sizeForm['modifyName'] = this.currentModifyName + }else{ + this.sizeForm['modifyName']=modifyName + } if (this.sizeForm.gaugeMax <= this.sizeForm.gaugeMin) { this.$message.error(this.$t('chart.max_more_than_mix')) return