[Improvement] Area: add item-height & visible-item-count props (#591)

This commit is contained in:
neverland 2018-01-30 20:27:36 +08:00 committed by GitHub
parent 1f19852118
commit 9df66da212
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 8 additions and 0 deletions

View File

@ -44,6 +44,8 @@ Set `columns-num` with 2, you'll have a 2 level picker.
| title | Toolbar title | `String` | `''` | - |
| area-list | an object contains these properties: `province_list`, `city_list` and `county_list` | `Object` | - | - |
| columns-num | level of picker | `String`,`Number` | 3 | - |
| item-height | Option height | `Number` | `44` | - |
| visible-item-count | Count of visible columns | `Number` | `5` | - |
### Event

View File

@ -42,6 +42,8 @@ Vue.use(Area);
| title | 顶部栏标题 | `String` | `''` | - |
| area-list | 省市县数据,格式见下方 | `Object` | - | - |
| columns-num | 省市县显示列数3-省市县2-省市1-省 | `String`,`Number` | `3` | - |
| item-height | 选项高度 | `Number` | `44` | - |
| visible-item-count | 可见的选项个数 | `Number` | `5` | - |
### Event

View File

@ -6,6 +6,8 @@
value-key="name"
:title="title"
:columns="columns"
:item-height="itemHeight"
:visible-item-count="visibleItemCount"
@change="onChange"
@confirm="$emit('confirm', $event)"
@cancel="$emit('cancel', $event)"
@ -27,6 +29,8 @@ export default create({
value: {},
title: String,
areaList: Object,
itemHeight: Number,
visibleItemCount: Number,
// 3-2-1-
columnsNum: {
type: [String, Number],