|
@@ -41,9 +41,19 @@ class MedicalInfo extends Component {
|
|
handleChangeValue&&handleChangeValue(val);
|
|
handleChangeValue&&handleChangeValue(val);
|
|
}
|
|
}
|
|
handleChange(){
|
|
handleChange(){
|
|
|
|
+ const value = this.$inp.current.value;
|
|
|
|
+ const {clearResult} = this.props;
|
|
this.setState({
|
|
this.setState({
|
|
- val:this.$inp.current.value
|
|
|
|
|
|
+ val: value
|
|
});
|
|
});
|
|
|
|
+ if (value === '') {
|
|
|
|
+ this.setState({
|
|
|
|
+ val: '',
|
|
|
|
+ hasSearch: false,
|
|
|
|
+ msg: ''
|
|
|
|
+ });
|
|
|
|
+ clearResult && clearResult();
|
|
|
|
+ }
|
|
}
|
|
}
|
|
handleEnter(e){
|
|
handleEnter(e){
|
|
if(e.keyCode==13){
|
|
if(e.keyCode==13){
|