|
@@ -82,6 +82,11 @@ class ScaleSearch extends Component {
|
|
|
});
|
|
|
}
|
|
|
}
|
|
|
+ componentWillReceiveProps(){
|
|
|
+ this.setState({
|
|
|
+ hasSearch: false
|
|
|
+ });
|
|
|
+ }
|
|
|
render() {
|
|
|
const {searchResult} = this.props;
|
|
|
const {val, hasSearch} = this.state;
|
|
@@ -100,7 +105,7 @@ class ScaleSearch extends Component {
|
|
|
<ul>
|
|
|
{this.getSearchList()}
|
|
|
</ul>
|
|
|
- </div>:hasSearch && <p className={style['no-data']}>暂无搜索结果!</p>}
|
|
|
+ </div>:<p className={style['no-data']}>{hasSearch?'搜索中...':'暂无搜索结果!'}</p>}
|
|
|
</div>
|
|
|
)
|
|
|
|