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

注释计算公式结果keyDown事件,Chrome41不支持。key方法(1889)

zhangxc 5 роки тому
батько
коміт
68c3f81bf6
1 змінених файлів з 4 додано та 4 видалено
  1. 4 4
      src/components/ChronicInfo/index.jsx

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

@@ -232,10 +232,10 @@ class ChronicInfo extends React.Component{
   }
   handleReg(e){   //只能输入数字和特殊符号
     //const hasDot = e.target.value.indexOf('.')!=-1;
-    const key = e.key;
-    if(key!='Backspace'&&((/[^\d|.\/%*~]/.test(key)))){
-      e.preventDefault();
-    }
+    // const key = e.key;
+    // if(key!='Backspace'&&((/[^\d|.\/%*~]/.test(key)))){
+    //   e.preventDefault();
+    // }
   }
   handleInputformula(id,calcuContent,i,e) {
     const {calcuValues} = this.state;