mirror of
https://gitee.com/vant-contrib/vant-weapp.git
synced 2025-04-06 03:58:05 +08:00
[new feature] SwitchCell: add new props active-color、inactive-color (#1061)
This commit is contained in:
parent
dbc0d6708a
commit
e4f39e187d
@ -67,6 +67,8 @@ Page({
|
|||||||
| loading | 是否为加载状态 | `Boolean` | `false` |
|
| loading | 是否为加载状态 | `Boolean` | `false` |
|
||||||
| disabled | 是否为禁用状态 | `Boolean` | `false` |
|
| disabled | 是否为禁用状态 | `Boolean` | `false` |
|
||||||
| size | 开关尺寸 | `String` | `26px` |
|
| size | 开关尺寸 | `String` | `26px` |
|
||||||
|
| active-color | 开关打开时的背景色 | `String` | `#1989fa` |
|
||||||
|
| inactive-color | 开关关闭时的背景色 | `String` | `#fff` |
|
||||||
|
|
||||||
### Event
|
### Event
|
||||||
|
|
||||||
|
@ -9,6 +9,8 @@ VantComponent({
|
|||||||
checked: Boolean,
|
checked: Boolean,
|
||||||
loading: Boolean,
|
loading: Boolean,
|
||||||
disabled: Boolean,
|
disabled: Boolean,
|
||||||
|
activeColor: String,
|
||||||
|
inactiveColor: String,
|
||||||
size: {
|
size: {
|
||||||
type: String,
|
type: String,
|
||||||
value: '26px'
|
value: '26px'
|
||||||
|
@ -9,6 +9,8 @@
|
|||||||
checked="{{ checked }}"
|
checked="{{ checked }}"
|
||||||
loading="{{ loading }}"
|
loading="{{ loading }}"
|
||||||
disabled="{{ disabled }}"
|
disabled="{{ disabled }}"
|
||||||
|
active-color="{{ activeColor }}"
|
||||||
|
inactive-color="{{ inactiveColor }}"
|
||||||
custom-class="van-switch-cell__switch"
|
custom-class="van-switch-cell__switch"
|
||||||
bind:change="onChange"
|
bind:change="onChange"
|
||||||
/>
|
/>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user