Browse Source

~处理

zhouna 6 năm trước cách đây
mục cha
commit
8004521eb7
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      src/components/NumberDrop/index.jsx

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

@@ -139,7 +139,7 @@ class NumberDrop extends Component{
     if(index1!=-1&&index1==txt.lastIndexOf('~')&&index1!=txt.length-1){   //有且只有一个~,且不在最后
       arr1 = txt.split('~');
       //~的范围在合理范围内为合理值
-      if(!isNaN(+arr1[0])&&!isNaN(+arr1[1])&&+arr1[0]>min&&+arr1[1]<max){
+      if(!isNaN(+arr1[0])&&!isNaN(+arr1[1])&&((!needCompare)||(needCompare&&min<arr1[0]&&arr1[0]<max&&min<arr1[1]&&arr1[1]<max))){
         return true
       }
       return false;