Commit 075f6215e4e62f7d6ff411def96ec2e400b1050e

Authored by leonisme
1 parent c110b728

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 {
... ...