|
@@ -95,8 +95,9 @@ class NumberDrop extends Component{
|
|
|
}
|
|
|
handleKeyDowm(e){
|
|
|
if(e.keyCode==13){
|
|
|
- const {reFocus,num} = this.props;
|
|
|
+ const {reFocus,num,handleHide} = this.props;
|
|
|
reFocus&&reFocus(num);
|
|
|
+ handleHide && handleHide();
|
|
|
}
|
|
|
}
|
|
|
handleNumClick(e){ //数字框不可编辑的状态时点击事件,点击将数字框变为可输入且下拉不再显示直到失焦后再次聚集
|
|
@@ -197,17 +198,6 @@ class NumberDrop extends Component{
|
|
|
const {handleHide} = this.props;
|
|
|
handleHide&&handleHide();
|
|
|
}
|
|
|
- // handleKeyDowm(e){
|
|
|
- // handleEnter();
|
|
|
- //只能输入数字
|
|
|
- /*const key = e.key;
|
|
|
- const ctrlOn = e.ctrlKey;
|
|
|
- const isCopyPaste = ctrlOn&&(key=='v'||key=='c');
|
|
|
- if((!/[0-9|.|~|\/]/.test(key)&&key.length==1&&!isCopyPaste)){
|
|
|
- e.preventDefault();
|
|
|
- return false;
|
|
|
- }*/
|
|
|
- // }
|
|
|
getClasses(){ //整个标签是否有值的状态
|
|
|
const {hideTag,placeholder,value,isImports} = this.props;
|
|
|
const val = value;
|