Commit a730fc3dd5f16fee1288145ae8ddcf24c0e7a2dc

Authored by Aresn
Committed by GitHub
2 parents 4bd90fff 075f6215

Merge pull request #1452 from leonisme/2.0

Fix a bug in input-number component
Showing 1 changed file with 1 additions and 1 deletions   Show diff stats
src/components/input-number/input-number.vue
... ... @@ -60,7 +60,7 @@
60 60 // return (num1 * m + num2 * m) / m;
61 61 // }
62 62 m = Math.pow(10, Math.max(sq1, sq2));
63   - return (num1 * m + num2 * m) / m;
  63 + return (Math.round(num1 * m) + Math.round(num2 * m)) / m;
64 64 }
65 65  
66 66 export default {
... ...