Toggles between two states.
Switch
Default, custom color, and disabled
<m-switch checked @change="onSwitchChange" />
<m-switch disabled />
<m-switch color="#10B981" />| 属性 | 说明 | 类型 | 默认值 |
|---|---|---|---|
checked | Whether the switch is on | boolean | false |
disabled | Whether disabled | boolean | false |
color | Track color when on | string | - |
| 属性 | 说明 | 类型 | 默认值 |
|---|---|---|---|
change | Fired when the value changes | { value: boolean } | - |