fix
This commit is contained in:
parent
3fce7cc644
commit
7a0a979506
1 changed files with 7 additions and 2 deletions
|
@ -186,8 +186,13 @@
|
||||||
},
|
},
|
||||||
precisionValue () {
|
precisionValue () {
|
||||||
// can not display 1.0
|
// can not display 1.0
|
||||||
if(!this.currentValue) return this.currentValue;
|
// if(!this.currentValue) return this.currentValue;
|
||||||
return this.precision ? this.currentValue.toFixed(this.precision) : this.currentValue;
|
// return this.precision ? this.currentValue.toFixed(this.precision) : this.currentValue;
|
||||||
|
let arr = (this.currentValue + '').split('.');
|
||||||
|
if (this.precision && arr[1] && this.precision < arr[1].length) {
|
||||||
|
return this.currentValue.toFixed(this.precision);
|
||||||
|
}
|
||||||
|
return this.currentValue;
|
||||||
},
|
},
|
||||||
formatterValue () {
|
formatterValue () {
|
||||||
if (this.formatter && this.precisionValue !== null) {
|
if (this.formatter && this.precisionValue !== null) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue