feat(Area): add columns-placeholder prop (#4566)

This commit is contained in:
Jake
2019-09-25 21:33:46 +08:00
committed by neverland
parent 89d97ee5cb
commit 306d595fbd
5 changed files with 148 additions and 4 deletions
+13
View File
@@ -40,6 +40,18 @@ Set `columns-num` with 2, you'll have a 2 level picker.
<van-area :area-list="areaList" :columns-num="2" title="Title" />
```
### Columns Placeholder
`columns-placeholder` property is used to config placeholder of columns.
```html
<van-area
:area-list="areaList"
:columns-placeholder="['Choose']"
title="Title"
/>
```
## API
### Props
@@ -50,6 +62,7 @@ Set `columns-num` with 2, you'll have a 2 level picker.
| title | Toolbar title | *string* | - | - |
| area-list | Area data | *object* | - | - |
| columns-num | level of picker | *string \| number* | `3` | - |
| columns-placeholder | placeholder of columns | *string[]* | `[]` | - |
| item-height | Option height | *number* | `44` | - |
| loading | Whether to show loading prompt | *boolean* | `false` | - |
| visible-item-count | Count of visible columns | *number* | `5` | - |