Skip to content
On this page

Switch 开关

Switch 组件用来切换数据状态。

基本用法

禁用

尺寸

颜色

文字

事件

属性

属性名类型默认值说明
modelValueboolean--绑定值
disablebooleanfalse禁用状态
onBackgroundstring--开启时背景色
offBackgroundstring--关闭时背景色
onColorstring--开启时文本色
offColorstring--关闭时文本色
onLabelstring--开启时文字
offLabelstring--关闭时文字
size`'small''medium''large'`

事件

事件名参数说明
update:modelValueboolean 当前状态更新开关状态事件
onModelValueChanged-开关值变化事件

插槽

TIP

暂无内容