|
@@ -19,6 +19,14 @@ export const getSearchResult = (value) =>{
|
|
|
type: SET_SEARCH_VALUE,
|
|
|
searchValue: value
|
|
|
})
|
|
|
+ //如果搜索值为空,则直接将搜索结果设为空
|
|
|
+ if(value === '') {
|
|
|
+ dispatch({
|
|
|
+ type: GET_SEARCH_RESULT,
|
|
|
+ searchResult: []
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
json(url, param).then((data)=>{
|
|
|
const searchRes = data.data.data;
|
|
|
const diagList = state.diagnosticList.diagnosticList;
|