Switch
Basic usage
Disabled
Adding the disabled attribute disables Switch.
Text description
You can add checkedChildren
and unCheckedChildren
attribute to show texts.
Size
Loading
Setting the loading
attribute to true
indicates a loading state on the Switch.
Select API
Select Attributes
Name | Description | Type | Default | Version |
---|---|---|---|---|
value(v-model) | binding value | boolean | — | |
disabled | disabled | boolean | false | |
loading | loading | boolean | false | |
size | size | default | small | default | |
checkedChildren | content to be shown when the state is checked | string | — | |
unCheckedChildren | content to be shown when the state is unchecked | string | — | |
checkedValue | value for checked state | boolean | string | number | true | |
unCheckedValue | value for unchecked state | boolean | string | number | false |
Select Events
Name | Description | Type |
---|---|---|
change | 仅当 modelValue 改变时 | (value, e) => void |