Switch 2.9alpha

API

Attributes

NameDescriptionTypeDefault
disabled是否禁用booleanfalse
modelValue设置switch开关状态booleanfalse
activeColor背景颜色(开启)string#32CD66
inactiveColor背景颜色(关闭)string#E2E2E2
sliderColor摇杆颜色string#FFFFFF
inactiveBorderColor关闭状态下边框颜色string#B5B5B5
disabledActiveBgColor禁用状态下背景颜色(开启)string#269A4D
disabledInactiveBgColor禁用状态下背景颜色(关闭)string#AAAAAA
borderSize边框大小number3
sliderAssetsIcon设置摇杆按钮assets图片string
sliderNetworkIcon边框摇杆按钮网络图片string

Callback

MethodDescription返回类型
onSwitchChange选中状态{name: 'xxx', isChecked: true | flase}

Source

ComponentDocs

Contributors