Checkbox 多选框
规则
js
{
type:"checkbox",
title:"标签",
field:"label",
value:["1","2","3"],
options:[
{value:"1",label:"好用",disabled:true},
{value:"2",label:"方便",disabled:false},
{value:"3",label:"实用",disabled:false},
{value:"4",label:"有效",disabled:false},
]
}
完整配置项:Element_Checkbox
value :Array
Options
字段名 | 说明 | 字段类型 | 是否必填 | 默认值 |
---|---|---|---|---|
value | 参数值 | String,Number | true | - |
label | 字段别名 | String | true | - |
disabled | 设置为禁用状态 | Boolean | false | false |
Props
属性名 | 说明 | 类型 | 默认值 |
---|---|---|---|
size | 多选框组尺寸 | enum | — |
type | 多选框类型 | 'button' | 'checkbox' | - |
disabled | 是否禁用 | boolean | false |
min | 可被勾选的 checkbox 的最小数量 | number | — |
max | 可被勾选的 checkbox 的最大数量 | number | — |
ariaLabel | 原生 aria-label 属性 | string | — |
textColor | 当按钮为活跃状态时的字体颜色 | string | #ffffff |
fill | 当按钮为活跃状态时的边框和背景颜色 | string | #409eff |
tag | 复选框组元素标签 | string | div |
validateEvent | 是否触发表单验证 | boolean | true |
Events
事件名 | 说明 | 类型 |
---|---|---|
change | 当绑定值变化时触发的事件 | Function |