[new feature] Picker: add loading prop (#619)

This commit is contained in:
neverland
2018-02-07 17:09:09 +08:00
committed by GitHub
parent 866aff9c45
commit e53f543639
10 changed files with 59 additions and 9 deletions
+1
View File
@@ -45,6 +45,7 @@ Set `columns-num` with 2, you'll have a 2 level picker.
| 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` | - |
| loading | Whether to show loading prompt | `Boolean` | `false` | - |
| visible-item-count | Count of visible columns | `Number` | `5` | - |
### Event
+8
View File
@@ -114,6 +114,13 @@ export default {
};
```
#### Loading
When Picker columns data is acquired asynchronously, use `loading` prop to show loading prompt
```html
<van-picker :columns="columns" loading />
```
### API
| Attribute | Description | Type | Default | Accepted Values |
@@ -121,6 +128,7 @@ export default {
| columns | Columns data | `Array` | `[]` | - |
| show-toolbar | Whether to show toolbar | `Boolean` | `false` | - |
| title | Toolbar title | `String` | `''` | - |
| loading | Whether to show loading prompt | `Boolean` | `false` | - |
| confirm-button-text | Text of confirm button | `String` | `Confirm` | - |
| cancel-button-text | Text of cancel button | `String` | `Cancel` | - |
| item-height | Option height | `Number` | `44` | - |