|
@@ -93,11 +93,15 @@ class NumberDrop extends Component{
|
|
|
}
|
|
|
numInpBlur(e){ //数字框失焦,保存值到store中
|
|
|
e.stopPropagation();
|
|
|
- if(!e.target.innerText.trim()){
|
|
|
- this.setState({
|
|
|
- placeholder:this.props.placeholder
|
|
|
- });
|
|
|
- }
|
|
|
+ const that = this;
|
|
|
+ setTimeout(function(){ //第一次选中数字时placeholder闪一下优化
|
|
|
+ if(!that.state.hasSelect&&!e.target.innerText.trim()){
|
|
|
+ that.setState({
|
|
|
+ placeholder:that.props.placeholder
|
|
|
+ });
|
|
|
+ }
|
|
|
+ },100);
|
|
|
+
|
|
|
if(this.props.show){ //修改清空后第一次点击键盘不触发click事件bug
|
|
|
return;
|
|
|
}
|