fix(AddressEdit): area field validate error when showArea is false (#12393)

This commit is contained in:
ShuGang Zhou 2023-10-25 20:42:27 +08:00 committed by GitHub
parent 2a404822f6
commit eddb35c782
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -297,7 +297,7 @@ export default defineComponent({
label={t('area')} label={t('area')}
is-link={!disableArea} is-link={!disableArea}
modelValue={areaText.value} modelValue={areaText.value}
rules={rules.value.areaCode} rules={props.showArea ? rules.value.areaCode : undefined}
placeholder={props.areaPlaceholder || t('area')} placeholder={props.areaPlaceholder || t('area')}
onFocus={() => onFocus('areaCode')} onFocus={() => onFocus('areaCode')}
onClick={() => { onClick={() => {