<group>
<x-switch title="title" v-model="value"></x-switch>
</group>
x-switch should be used in Group.
API
Variables
Props
| name | type | default | description | required version |
| title | string | label text | -- | |
| disabled | boolean | false | if disabled | -- |
| value | boolean | false | component's value, use v-model for binding | -- |
| inline-desc | string | desctiption text below the label | -- | |
| prevent-default | boolean | false | prevent from setting value on being clicked | v2.5.0 |
| value-map | array | [false, true] | customize not-boolean values | v2.7.0 |
Events
| name | params | description | required version |
| @on-change | (value) | triggers when value change, params is (currentValue) | -- |
| @on-click | (newVal, oldVal) | triggers when being clicked | -- |
Variables
| name | default | description | inherited name |
| @switch-checked-bg-color | #04BE02 | -- | @theme-color |
| @switch-checked-border-color | #04BE02 | -- | @theme-color |
| @switch-disabled-opacity | 0.6 | -- | |
| @switch-height | 32px | -- |