mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-06 03:57:59 +08:00
[new feature] SwitchCell: add active-color & inactive-color prop (#2273)
This commit is contained in:
parent
cac7e0beff
commit
a4a2ce9635
@ -57,9 +57,11 @@ use `loading` property to keep component in loading state
|
||||
| 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` |
|
||||
|
||||
### Event
|
||||
|
||||
| Event | Description | Arguments |
|
||||
|------|------|------|
|
||||
| change | triggered when the on-off state is changed | checked: switch is on or not |
|
||||
| change | triggered when the on-off state is changed | checked: switch is on or not |
|
||||
|
@ -29,6 +29,8 @@ export default create({
|
||||
border: Boolean,
|
||||
loading: Boolean,
|
||||
disabled: Boolean,
|
||||
activeColor: String,
|
||||
inactiveColor: String,
|
||||
size: {
|
||||
type: String,
|
||||
default: '24px'
|
||||
|
@ -57,6 +57,8 @@ export default {
|
||||
| loading | 是否为加载状态 | `Boolean` | `false` | - |
|
||||
| disabled | 是否为禁用状态 | `Boolean` | `false` | - |
|
||||
| size | 开关尺寸 | `String` | `24px` | 1.1.11 |
|
||||
| active-color | 开关时的背景色 | `String` | `#1989fa` | 1.4.10 |
|
||||
| inactive-color | 开关时的背景色 | `String` | `#fff` | 1.4.10 |
|
||||
|
||||
### Event
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user