[improvement] make props less magic (#3775)

This commit is contained in:
neverland
2019-07-08 16:18:19 +08:00
committed by GitHub
parent 642639da6e
commit be96fa2233
55 changed files with 283 additions and 206 deletions

View File

@@ -226,11 +226,11 @@ export default createComponent({
},
render(h) {
const { data, errorInfo } = this;
const { data, errorInfo, searchResult } = this;
const onFocus = name => () => this.onFocus(name);
// hide bottom field when use search && detail get focused
const hideBottomFields = this.searchResult.length && this.detailFocused;
const hideBottomFields = searchResult && searchResult.length && this.detailFocused;
return (
<div class={bem()}>