Skip to content

Commit 6961b79

Browse files
committed
fix(仪表板): 修复因延迟执行导致的指标卡批量操作字体和名称加粗失效问题 dataease#11543
1 parent 1e7eefa commit 6961b79

File tree

3 files changed

+15
-4
lines changed

3 files changed

+15
-4
lines changed

core/frontend/src/components/canvas/customComponent/UserView.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -878,7 +878,7 @@ export default {
878878
if (!sourceCustomAttr[param.property]) {
879879
this.$set(sourceCustomAttr, param.property, {})
880880
}
881-
sourceCustomAttr[param.property][param.value.modifyName] = param.value[param.value.modifyName]
881+
Vue.set(sourceCustomAttr[param.property], param.value.modifyName, param.value[param.value.modifyName])
882882
this.sourceCustomAttrStr = JSON.stringify(sourceCustomAttr)
883883
this.chart.customAttr = this.sourceCustomAttrStr
884884
this.$store.commit('updateComponentViewsData', {
@@ -892,7 +892,7 @@ export default {
892892
if (param.property === 'margin') {
893893
sourceCustomStyle[param.property] = param.value
894894
}
895-
sourceCustomStyle[param.property][param.value.modifyName] = param.value[param.value.modifyName]
895+
Vue.set(sourceCustomStyle[param.property], param.value.modifyName, param.value[param.value.modifyName])
896896
this.sourceCustomStyleStr = JSON.stringify(sourceCustomStyle)
897897
this.chart.customStyle = this.sourceCustomStyleStr
898898
this.$store.commit('updateComponentViewsData', {

core/frontend/src/store/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -847,7 +847,7 @@ const data = {
847847
}
848848
},
849849
setChangeProperties(state, propertyInfo) {
850-
state.changeProperties[propertyInfo.custom][propertyInfo.property] = propertyInfo.value
850+
Vue.set(state.changeProperties[propertyInfo.custom], propertyInfo.property, propertyInfo.value)
851851
},
852852
initCanvasBase(state) {
853853
this.commit('resetLastValidFilters')

core/frontend/src/views/chart/components/shapeAttr/SizeSelector.vue

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1166,6 +1166,7 @@
11661166
import { CHART_FONT_FAMILY, CHART_FONT_LETTER_SPACE, DEFAULT_SIZE } from '../../chart/chart'
11671167
import { includesAny } from '@/utils/StringUtils'
11681168
import _ from 'lodash'
1169+
import {mapState} from "vuex";
11691170
export default {
11701171
name: 'SizeSelector',
11711172
props: {
@@ -1224,6 +1225,11 @@ export default {
12241225
}
12251226
}
12261227
},
1228+
computed: {
1229+
...mapState([
1230+
'batchOptStatus'
1231+
])
1232+
},
12271233
mounted() {
12281234
this.init()
12291235
this.initData()
@@ -1303,13 +1309,18 @@ export default {
13031309
this.fontSize = arr
13041310
},
13051311
changeBarSizeCase(modifyName) {
1312+
this.currentModifyName = modifyName;
13061313
if (!this.doChange) {
13071314
this.doChange = _.debounce(() => this.debounceChange(modifyName), 200)
13081315
}
13091316
this.doChange()
13101317
},
13111318
debounceChange(modifyName) {
1312-
this.sizeForm['modifyName'] = modifyName
1319+
if(this.batchOptStatus){
1320+
this.sizeForm['modifyName'] = this.currentModifyName
1321+
}else{
1322+
this.sizeForm['modifyName']=modifyName
1323+
}
13131324
if (this.sizeForm.gaugeMax <= this.sizeForm.gaugeMin) {
13141325
this.$message.error(this.$t('chart.max_more_than_mix'))
13151326
return

0 commit comments

Comments
 (0)