feat(Area): add readonly prop (#7106)

This commit is contained in:
neverland 2020-09-05 06:57:05 +08:00 committed by GitHub
parent 3cd200f7c2
commit da193d0b71
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 1 deletions

View File

@ -64,6 +64,7 @@ To have a selected valuesimply pass the `code` of target area to `value` prop
| area-list | Area list data | _object_ | - |
| columns-placeholder `v2.2.5` | Placeholder of columns | _string[]_ | `[]` |
| loading | Whether to show loading prompt | _boolean_ | `false` |
| readonly `v2.10.5` | Whether to be readonly | _boolean_ | `false` |
| item-height `v2.8.6` | Option height, supports `px` `vw` `rem` unit, default `px` | _number \| string_ | `44` |
| columns-num | Level of picker | _number \| string_ | `3` |
| visible-item-count | Count of visible columns | _number \| string_ | `6` |

View File

@ -64,6 +64,7 @@ Vue.use(Area);
| area-list | 省市区数据,格式见下方 | _object_ | - |
| columns-placeholder `v2.2.5` | 列占位提示文字 | _string[]_ | `[]` |
| loading | 是否显示加载状态 | _boolean_ | `false` |
| readonly `v2.10.5` | 是否为只读状态,只读状态下无法切换选项 | _boolean_ | `false` |
| item-height `v2.8.6` | 选项高度,支持 `px` `vw` `rem` 单位,默认 `px` | _number \| string_ | `44` |
| columns-num | 显示列数3-省市区2-省市1-省 | _number \| string_ | `3` |
| visible-item-count | 可见的选项个数 | _number \| string_ | `6` |

View File

@ -310,8 +310,9 @@ export default createComponent({
showToolbar
valueKey="name"
title={this.title}
loading={this.loading}
columns={this.displayColumns}
loading={this.loading}
readonly={this.readonly}
itemHeight={this.itemHeight}
swipeDuration={this.swipeDuration}
visibleItemCount={this.visibleItemCount}