[new feature] SwitchCell: add active-value & inactive-value prop (#2591)

This commit is contained in:
neverland
2019-01-22 22:23:38 +08:00
committed by GitHub
parent a16786b5ad
commit e81902b4cf
3 changed files with 19 additions and 4 deletions

View File

@@ -30,6 +30,7 @@ export default {
#### Disabled
use `disabled` property to disable the component
```html
@@ -40,6 +41,7 @@ use `disabled` property to disable the component
#### Loading
use `loading` property to keep component in loading state
```html
@@ -52,13 +54,15 @@ use `loading` property to keep component in loading state
| Attribute | Description | Type | Default |
|------|------|------|------|
| v-model | on-off state of the switch | `Boolean` | - |
| v-model | on-off state of the switch | `any` | `false` |
| title | the leftside title | `String` | `''` |
| loading | whether switch is loading | `Boolean` | `false` |
| disabled | whether to disable switch | `Boolean` | `false` |
| size | Size of switch | `String` | `24px` |
| active-color | Background of switch color when active | `String` | `#1989fa` |
| inactive-color | Background of switch color when inactive | `String` | `#fff` |
| active-value | Value when active | `any` | `true` |
| inactive-value | Value when inactive | `any` | `false` |
### Event