forked from github/dataease
feat(视图): 计算占比时自动设置数值格式为百分比
This commit is contained in:
parent
ec2025c3ec
commit
e9470537b5
@ -385,6 +385,10 @@ export default {
|
||||
this.editCompare()
|
||||
break
|
||||
case 'percent':
|
||||
// 选择占比,自动将数值格式设置为百分比并保留2位小数
|
||||
this.item.formatterCfg.type = 'percent'
|
||||
this.item.formatterCfg.decimalCount = 2
|
||||
|
||||
this.item.compareCalc.type = 'percent'
|
||||
this.$emit('onQuotaItemChange', this.item)
|
||||
break
|
||||
|
@ -382,6 +382,10 @@ export default {
|
||||
this.editCompare()
|
||||
break
|
||||
case 'percent':
|
||||
// 选择占比,自动将数值格式设置为百分比并保留2位小数
|
||||
this.item.formatterCfg.type = 'percent'
|
||||
this.item.formatterCfg.decimalCount = 2
|
||||
|
||||
this.item.compareCalc.type = 'percent'
|
||||
this.$emit('onQuotaItemChange', this.item)
|
||||
break
|
||||
|
Loading…
Reference in New Issue
Block a user