From 3ff8eee2703a839cae1774727e113de14c661dbe Mon Sep 17 00:00:00 2001 From: rex Date: Wed, 11 Mar 2020 16:42:07 +0800 Subject: [PATCH] fix(AddressEdit): check addressDetail only when showDetail is true (#5803) --- src/address-edit/index.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/address-edit/index.js b/src/address-edit/index.js index 3e9d42179..987354b5e 100644 --- a/src/address-edit/index.js +++ b/src/address-edit/index.js @@ -168,7 +168,15 @@ export default createComponent({ }, onSave() { - const items = ['name', 'tel', 'areaCode', 'addressDetail']; + const items = ['name', 'tel']; + + if (this.showArea) { + items.push('areaCode'); + } + + if (this.showDetail) { + items.push('addressDetail'); + } if (this.showPostal) { items.push('postalCode');