Browse Source

去掉数字键盘0的限制

luolei 5 years atrás
parent
commit
96e24d624e
1 changed files with 4 additions and 4 deletions
  1. 4 4
      src/common/components/NumberUnitPan/index.jsx

+ 4 - 4
src/common/components/NumberUnitPan/index.jsx

@@ -22,10 +22,10 @@ class NumberUnitPan extends Component{
     const {handleSelect,toClear} = this.props;
     const text = e.target.innerText || e.target.innerHTML;
     const preValue = this.state.value;
-    if(+text==0 && !preValue){//第一位不能是0
-      Notify.info("请输入正确时间");
-      return false;
-    }
+    // if(+text==0 && !preValue){//第一位不能是0
+    //   Notify.info("请输入正确时间");
+    //   return false;
+    // }
     const value = toClear?'':this.state.value;     //键盘输入替换已有的值
     this.setState({
       value: value+text