开关 SwitchButton
1.状态属性
| 属性名称 | 数据类型 | 是否必填 | 默认值 | 回传参数 | 说明 |
|---|---|---|---|---|---|
| name | string | 是 | null | 空 | 表单字段名称 |
| label | string | 否 | null | 空 | 表单字段描述 |
| width | number | 否 | null | 空 | 宽度 |
| height | number | 否 | null | 空 | 高度 |
| value | number,string | 否 | "" | 空 | 默认值 |
| text | number,string | 否 | "" | 空 | 默认文本值 |
| placeholder | string | 否 | null | 空 | 文本框内部预留文字 |
| readonly | bool | 否 | false | 空 | 是否只读 |
| required | bool | 否 | false | 空 | 是否必填 |
| onlyline | bool | 否 | false | 空 | 是否只占一行 |
| hide | bool | 否 | false | 空 | 是否隐藏 |
| style | Object | 否 | null | 空 | 自定义style |
| className | string | 否 | null | 空 | 自定义class |
| regexp | bool | 否 | null | 空 | 自定义正则表达式 |
| invalidTip | bool | 否 | null | 空 | 自定义的错误提示信息 |
| size | enum | 否 | default | 空 | 组件大小,default(只占一列),large(两列),onlyline(一行) |
| position | enum | 否 | default | 空 | 组件位置,default(默认),left(靠左),right(靠右),方便错误提示信息的位置 |
| onSelect | string | 否 | null | value,value,name,null | 值改变事件 |
| showChildren | bool | 否 | false | 空 | 是否显示开关 文本值 |
| checkedChildren | string | 否 | 是 | 空 | 开关开的时候显示的文本值 |
| unCheckedChildren | string | 否 | 否 | 空 | 开关为关的时候显示的文本值 |