mirror of
https://github.com/ElemeFE/element.git
synced 2025-12-19 12:04:02 +08:00
@@ -195,7 +195,7 @@
|
||||
methods: {
|
||||
toPrecision(num, precision) {
|
||||
if (precision === undefined) precision = this.numPrecision;
|
||||
return parseFloat(Number(num).toFixed(precision));
|
||||
return parseFloat(Math.round(num * Math.pow(10, precision)) / Math.pow(10, precision));
|
||||
},
|
||||
getPrecision(value) {
|
||||
if (value === undefined) return 0;
|
||||
|
||||
Reference in New Issue
Block a user