Преглед на файлове

数字标签选中删除bug修改2830

zhouna преди 5 години
родител
ревизия
e7a23a1ebd
променени са 1 файла, в които са добавени 5 реда и са изтрити 5 реда
  1. 5 5
      src/components/NumberDrop/index.jsx

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

@@ -154,10 +154,10 @@ class NumberDrop extends Component{
   }
   numInpBlur(e){        //数字框失焦,保存值到store中
     e.stopPropagation();
-    const {handleSelect,ikey,suffix,prefix,mainSaveText,min,max,show,formulaCode} = this.props;
-    /*if(show){      //修改清空后第一次点击键盘不触发click事件bug--失焦placehoder消失,弃用
+    const {handleSelect,ikey,suffix,prefix,mainSaveText,min,max,formulaCode} = this.props;
+    if(!this.$span.current){      //操作为连续选中删除后,不做验证2830
       return;
-    }*/
+    }
     //输入超出合理范围或输入不是数字提示且清空
     const needCompare=min!=undefined&&max!=undefined;
     const txt = e.target.innerHTML.replace(/ $|^ /,'');//e.target.innerText.trim();
@@ -219,8 +219,8 @@ class NumberDrop extends Component{
     e.stopPropagation();
   }
   handleMouseDown(){
-    const {i,setSelectArea,boxMark}= this.props;
-    setSelectArea({i,boxMark,dir:'start'});
+    const {i,setSelectArea,boxMark,show}= this.props;
+    !show&&setSelectArea({i,boxMark,dir:'start'});
   }
   componentDidMount(){
     //设置最小宽度避免输入后宽度跳动