fix(AddressEdit): showDetail not work

This commit is contained in:
chenjiahan 2020-09-15 20:11:57 +08:00
parent 08c9b06ac1
commit d06f98e961
2 changed files with 29 additions and 24 deletions

View File

@ -13,6 +13,7 @@ const android = isAndroid();
export default createComponent({
props: {
show: Boolean,
value: String,
errorMessage: String,
focused: Boolean,
@ -96,28 +97,32 @@ export default createComponent({
emit('input', value);
};
return () => (
<>
<Field
v-slots={{ icon: renderFinish }}
autosize
ref={field}
class={bem()}
rows={props.detailRows}
type="textarea"
label={t('label')}
border={!showSearchResult()}
clearable={!android}
maxlength={props.detailMaxlength}
modelValue={props.value}
placeholder={t('placeholder')}
errorMessage={props.errorMessage}
onBlur={onBlur}
onFocus={onFocus}
{...{ 'onUpdate:modelValue': onInput }}
/>
{renderSearchResult()}
</>
);
return () => {
if (props.show) {
return (
<>
<Field
v-slots={{ icon: renderFinish }}
autosize
ref={field}
class={bem()}
rows={props.detailRows}
type="textarea"
label={t('label')}
border={!showSearchResult()}
clearable={!android}
maxlength={props.detailMaxlength}
modelValue={props.value}
placeholder={t('placeholder')}
errorMessage={props.errorMessage}
onBlur={onBlur}
onFocus={onFocus}
{...{ 'onUpdate:modelValue': onInput }}
/>
{renderSearchResult()}
</>
);
}
};
},
});

View File

@ -336,7 +336,7 @@ export default createComponent({
}}
/>
<Detail
vShow={this.showDetail}
show={this.showDetail}
value={data.addressDetail}
focused={this.detailFocused}
errorMessage={errorInfo.addressDetail}