Skip to content

Commit

Permalink
Merge pull request #292 from rijn/253
Browse files Browse the repository at this point in the history
changed regular expression to fit exactly one zero
  • Loading branch information
icarusion committed Feb 21, 2017
2 parents 09bce8d + 8df2943 commit f78d6ab
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/input-number/input-number.vue
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
const iconPrefixCls = 'ivu-icon';
function isValueNumber (value) {
return (/(^-?[0-9]+\.{1}\d+$)|(^-?[1-9][0-9]*$)/).test(value + '');
return (/(^-?[0-9]+\.{1}\d+$)|(^-?[1-9][0-9]*$)|(^-?0{1}$)/).test(value + '');

This comment has been minimized.

Copy link
@dreamcatcher081210

dreamcatcher081210 Aug 30, 2017

消除该组件无法输入0的神操作

}
function addNum (num1, num2) {
let sq1, sq2, m;
Expand Down

0 comments on commit f78d6ab

Please sign in to comment.