[Improvement] Picker: add props to custom button text (#548)

This commit is contained in:
neverland
2018-01-18 14:22:17 +08:00
committed by GitHub
parent 5c39921742
commit d8dc44a780
21 changed files with 49 additions and 22 deletions
+12
View File
@@ -121,10 +121,22 @@ export default {
| columns | Columns data | `Array` | `[]` | - |
| show-toolbar | Whether to show toolbar | `Boolean` | `false` | - |
| title | Toolbar title | `String` | `''` | - |
| confirm-button-text | Text of confirm button | `String` | `Confirm` | - |
| cancel-button-text | Text of cancel button | `String` | `Cancel` | - |
| item-height | Option height | `Number` | `44` | - |
| visibile-column-count | Count of visible columns | `Number` | `5` | - |
| value-key | Key of option text | `String` | `text` | - |
### Event
Picker events will pass different parameters according to the columns are single or multiple
| Event | Description | Arguments |
|-----------|-----------|-----------|
| confirm | Triggered when click confirm button | Single columncurrent valuecurrent index<br>Multiple columnscurrent valuescurrent indexes |
| cancel | Triggered when click cancel button | Single columncurrent valuecurrent index<br>Multiple columnscurrent valuescurrent indexes |
| change | Triggered when current option changed | Single columncurrent valuecurrent index<br>Multiple columnscurrent valuescolumn index |
### Data struct of columns
| key | Description |