Browse Source

数字组件双击编辑bug

zhouna 6 years ago
parent
commit
f44c8fa4aa
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/components/NumberDrop/index.jsx

+ 1 - 1
src/components/NumberDrop/index.jsx

@@ -97,7 +97,6 @@ class NumberDrop extends Component{
   }
   handleNumClick(e){     //数字框不可编辑的状态时点击事件,点击将数字框变为可输入且下拉不再显示直到失焦后再次聚集
     const {show,handleShow,ikey,id,patId,handleHide,value} = this.props;
-    this.$span.current.focus();
     if(show) {
       handleHide && handleHide();
       return;
@@ -111,6 +110,7 @@ class NumberDrop extends Component{
       clearTimeout(that.state.timer);
       const timer = setTimeout(function(){
         //只有弹窗关闭则点击数字键盘会清空当前数据
+        that.$span.current.focus();
         that.setState({
           hasSelect:false
         });