Switch 开关
基础用法
最普通的开关
loading
开关颜色
使用 activeColor 为开关打开时设置颜色, inactiveColor 为开关关闭时设置颜色
loading
禁用效果
使用 disabled 属性为开关设置禁用
loading
文字
使用 activeText 设置打开时显示的文字, inactiveText 设置关闭时显示的文字
loading
Switch API
Switch Attributes
| 属性名 | 说明 | 类型 | 默认值 |
|---|---|---|---|
| modelValue | v-model | 绑定的值(必需) | boolean | |
| disabled | 禁用 | boolean | false |
| activeColor | 打开时颜色 | string | #bebe |
| inactiveColor | 关闭时颜色 | string | #C0CCDA |
| activeText | 打开时显示的文字 | string | '' |
| inactoveText | 关闭时显示的文字 | string | '' |
