mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-05-22 14:39:16 +08:00
[Improvement] Area: add item-height & visible-item-count props (#591)
This commit is contained in:
parent
1f19852118
commit
9df66da212
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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],
|
||||
|
Loading…
x
Reference in New Issue
Block a user