fix(视图): 视图属性变更防抖,防止属性和实际效果不一致

This commit is contained in:
wisonic-s 2024-03-04 14:48:33 +08:00
parent 55fa2d4a10
commit a232c36713
2 changed files with 12 additions and 0 deletions

View File

@ -1302,6 +1302,12 @@ export default {
this.fontSize = arr
},
changeBarSizeCase(modifyName) {
if (!this.doChange) {
this.doChange = _.debounce(() => this.debounceChange(modifyName), 200)
}
this.doChange()
},
debounceChange(modifyName) {
this.sizeForm['modifyName'] = modifyName
if (this.sizeForm.gaugeMax <= this.sizeForm.gaugeMin) {
this.$message.error(this.$t('chart.max_more_than_mix'))

View File

@ -1897,6 +1897,12 @@ export default {
this.fontSize = arr
},
changeBarSizeCase(modifyName) {
if (!this.doChange) {
this.doChange = _.debounce(() => this.debounceChange(modifyName), 200)
}
this.doChange()
},
debounceChange(modifyName) {
this.sizeForm['modifyName'] = modifyName
if (this.sizeForm.gaugeMax <= this.sizeForm.gaugeMin) {
this.$message.error(this.$t('chart.max_more_than_mix'))