We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d8002cc commit af0dc35Copy full SHA for af0dc35
packages/input-number/src/input-number.vue
@@ -195,7 +195,7 @@
195
methods: {
196
toPrecision(num, precision) {
197
if (precision === undefined) precision = this.numPrecision;
198
- return parseFloat(Number(num).toFixed(precision));
+ return parseFloat(Math.round(num * Math.pow(10, precision)) / Math.pow(10, precision));
199
},
200
getPrecision(value) {
201
if (value === undefined) return 0;
0 commit comments