Browse Source

Merge branch 'dev/new1' into dev/byll

Luolei 6 years atrás
parent
commit
756d9cdf56
2 changed files with 13 additions and 9 deletions
  1. 4 4
      src/components/MainSuit/index.jsx
  2. 9 5
      src/components/NumberDrop/index.jsx

+ 4 - 4
src/components/MainSuit/index.jsx

@@ -249,16 +249,16 @@ class MainSuit extends Component{
       }
     }
     // 延时关闭常见症状下拉、清空搜索结果,不延时会影响选中
-      clearTimeout(this.state.clearTimer);
+      // clearTimeout(this.state.clearTimer);
       const clearTimer = setTimeout(function(){
         clearSearch && clearSearch();
         // that.setState({
         //   symptom:false
         // })
       },config.delayTime-200);
-      this.setState({
-        clearTimer
-      });  
+      // this.setState({
+      //   clearTimer
+      // });  
   }
 
 

+ 9 - 5
src/components/NumberDrop/index.jsx

@@ -93,11 +93,15 @@ class NumberDrop extends Component{
   }
   numInpBlur(e){        //数字框失焦,保存值到store中
     e.stopPropagation();
-    if(!e.target.innerText.trim()){
-      this.setState({
-        placeholder:this.props.placeholder
-      });
-    }
+    const that = this;
+    setTimeout(function(){      //第一次选中数字时placeholder闪一下优化
+      if(!that.state.hasSelect&&!e.target.innerText.trim()){
+        that.setState({
+          placeholder:that.props.placeholder
+        });
+      }
+    },100);
+
     if(this.props.show){      //修改清空后第一次点击键盘不触发click事件bug
       return;
     }