调整IE不兼容的问题, 支持IE10以上
This commit is contained in:
maplemei
2019-09-23 15:46:57 +08:00
parent 415cd9ac4d
commit 4c5d0dcccb
5 changed files with 33 additions and 15 deletions

View File

@@ -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);
}
}
}