Appearance
Switch 开关
基本使用
文字描述
扩展的 value 类型
API
| 参数 | 描述 | 类型 | 默认值 | 是否必填 |
|---|---|---|---|---|
| model-value / v-model | 绑定值,必须等于 active-value 或 inactive-value,默认为 Boolean 类型 | boolean / string / number | ||
| activeText | 打开时的文字描述 | string | ||
| inactiveText | 状态为 off 时的文字描述 | string | ||
| activeValue | switch 状态为 on 时的值 | boolean / string / number | true | |
| inactiveValue | switch 的状态为 off 时的值 | boolean / string / number | false | |
| readonly | 是否只读 | boolean | ||
| inlinePrompt | 无论图标或文本是否显示在点内,只会呈现文本的第一个字符 | boolean |