mirror of
https://github.com/youzan/vant.git
synced 2025-10-21 19:24:16 +00:00
fix(AddressEdit): incorrect bottom fields when get focused
This commit is contained in:
@@ -113,6 +113,12 @@ export default createComponent({
|
|||||||
}
|
}
|
||||||
return '';
|
return '';
|
||||||
},
|
},
|
||||||
|
|
||||||
|
// hide bottom field when use search && detail get focused
|
||||||
|
hideBottomFields() {
|
||||||
|
const { searchResult } = this;
|
||||||
|
return searchResult && searchResult.length && this.detailFocused;
|
||||||
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
watch: {
|
watch: {
|
||||||
@@ -290,13 +296,9 @@ export default createComponent({
|
|||||||
},
|
},
|
||||||
|
|
||||||
render(h) {
|
render(h) {
|
||||||
const { data, errorInfo, searchResult, disableArea } = this;
|
const { data, errorInfo, disableArea, hideBottomFields } = this;
|
||||||
const onFocus = (name) => () => this.onFocus(name);
|
const onFocus = (name) => () => this.onFocus(name);
|
||||||
|
|
||||||
// hide bottom field when use search && detail get focused
|
|
||||||
const hideBottomFields =
|
|
||||||
searchResult && searchResult.length && this.detailFocused;
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div class={bem()}>
|
<div class={bem()}>
|
||||||
<div class={bem('fields')}>
|
<div class={bem('fields')}>
|
||||||
|
Reference in New Issue
Block a user