Skip to content

Switch 开关

规则

js
{
    type:"switch",
    title:"是否上架",
    field:"is_show",
    value:"1",
    props: {},
}
{
    type:"switch",
    title:"是否上架",
    field:"is_show",
    value:"1",
    props: {},
}

参考:arco-design_Switch

value :Number | String

Props

参数名描述类型默认值版本
disabled是否禁用booleanfalse
loading是否为加载中状态booleanfalse
type开关的类型'circle' | 'round' | 'line''circle'
size开关的大小'small' | 'medium''medium'
checked-value选中时的值string|number|booleantrue2.12.0
unchecked-value未选中时的值string|number|booleanfalse2.12.0
checked-color选中时的开关颜色string-2.12.0
unchecked-color选中时的开关颜色string-2.12.0

Events

事件名描述参数
change值改变时触发value: union

Released under the MIT License.