Browse Source

数字单位键盘bug修改2946

zhouna 5 years ago
parent
commit
abefebcce7
1 changed files with 2 additions and 2 deletions
  1. 2 2
      src/common/components/NumberUnitPan/index.jsx

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

@@ -48,10 +48,10 @@ class NumberUnitPan extends Component{
   handleBack(e){
   handleBack(e){
     e.stopPropagation();
     e.stopPropagation();
      const {handleSelect,value} = this.props;
      const {handleSelect,value} = this.props;
-    const len = value.length-1;
-    if(len<0){
+    if(value===undefined||value==''){
       return;
       return;
     }
     }
+    const len = value.length-1;
     const text = value.substring(0,len);
     const text = value.substring(0,len);
     this.setState({
     this.setState({
       value:text
       value:text