diff --git a/src/address-edit/README.md b/src/address-edit/README.md index fafcf28e2..8bd371d86 100644 --- a/src/address-edit/README.md +++ b/src/address-edit/README.md @@ -73,6 +73,9 @@ export default { | show-delete | Whether to show delete button | *boolean* | `false` | | show-set-default | Whether to show default address switch | *boolean* | `false` | | show-search-result | Whether to show address search result | *boolean* | `false` | +| show-area | Whether to show area cell | *boolean* | `true` | +| show-detail | Whether to show detail field | *boolean* | `true` | +| disable-area | Whether to disable area select | *boolean* | `false` | | save-button-text | Save button text | *string* | `Save` | | delete-button-text | Delete button text | *string* | `Delete` | | detail-rows | Detail input rows | *number \| string* | `1` | diff --git a/src/address-edit/README.zh-CN.md b/src/address-edit/README.zh-CN.md index ac93c6d30..80efbddb8 100644 --- a/src/address-edit/README.zh-CN.md +++ b/src/address-edit/README.zh-CN.md @@ -73,6 +73,9 @@ export default { | show-delete | 是否显示删除按钮 | *boolean* | `false` | | show-set-default | 是否显示默认地址栏 | *boolean* | `false` | | show-search-result | 是否显示搜索结果 | *boolean* | `false` | +| show-area | 是否显示地区 | *boolean* | `true` | +| show-detail | 是否显示详细地址 | *boolean* | `true` | +| disable-area | 是否禁用地区选择 | *boolean* | `false` | | save-button-text | 保存按钮文字 | *string* | `保存` | | delete-button-text | 删除按钮文字 | *string* | `删除` | | detail-rows | 详细地址输入框行数 | *number \| string* | `1` | diff --git a/src/address-edit/index.js b/src/address-edit/index.js index e24164db3..3e9d42179 100644 --- a/src/address-edit/index.js +++ b/src/address-edit/index.js @@ -52,6 +52,7 @@ export default createComponent({ type: Boolean, default: true, }, + disableArea: Boolean, detailRows: { type: [Number, String], default: 1, @@ -250,7 +251,7 @@ export default createComponent({ }, render() { - const { data, errorInfo, searchResult } = this; + const { data, errorInfo, searchResult, disableArea } = this; const onFocus = name => () => this.onFocus(name); // hide bottom field when use search && detail get focused @@ -280,15 +281,15 @@ export default createComponent({ { - this.showAreaPopup = true; + this.showAreaPopup = !disableArea; }} />