Переглянути джерело

数字组件双击编辑bug

zhouna 6 роки тому
батько
коміт
f44c8fa4aa
1 змінених файлів з 1 додано та 1 видалено
  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
         });