[new feature] SwitchCell: add new props active-color、inactive-color (#1061)

This commit is contained in:
rex 2018-12-12 15:35:08 +08:00 committed by neverland
parent dbc0d6708a
commit e4f39e187d
3 changed files with 6 additions and 0 deletions

View File

@ -67,6 +67,8 @@ Page({
| loading | 是否为加载状态 | `Boolean` | `false` |
| disabled | 是否为禁用状态 | `Boolean` | `false` |
| size | 开关尺寸 | `String` | `26px` |
| active-color | 开关打开时的背景色 | `String` | `#1989fa` |
| inactive-color | 开关关闭时的背景色 | `String` | `#fff` |
### Event

View File

@ -9,6 +9,8 @@ VantComponent({
checked: Boolean,
loading: Boolean,
disabled: Boolean,
activeColor: String,
inactiveColor: String,
size: {
type: String,
value: '26px'

View File

@ -9,6 +9,8 @@
checked="{{ checked }}"
loading="{{ loading }}"
disabled="{{ disabled }}"
active-color="{{ activeColor }}"
inactive-color="{{ inactiveColor }}"
custom-class="van-switch-cell__switch"
bind:change="onChange"
/>