v1.0.1
调整IE不兼容的问题, 支持IE10以上
This commit is contained in:
@@ -80,12 +80,14 @@ class General extends Component{
|
||||
}
|
||||
|
||||
componentWillReceiveProps(props){
|
||||
if(!props.show){
|
||||
//清空输入框的值
|
||||
this.setState({ searchVal: '' });
|
||||
}else{
|
||||
//聚焦输入框
|
||||
setTimeout(() => this.focus(), 0);
|
||||
if(this.props.show != props.show){
|
||||
if(!props.show){
|
||||
//清空输入框的值
|
||||
this.setState({ searchVal: '' });
|
||||
}else{
|
||||
//聚焦输入框
|
||||
setTimeout(() => this.focus(), 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user