要使用 Checkbox 组件,只需要配置 type: 'checkbox',选中意味着变量的值为 true。默认绑定变量的值会是 Boolean,选中为 true。
设置 disabled 属性即可,它接受一个 Boolean,true 为禁用,也可以接受一个返回 Boolean 的函数。
设置 activeValue 为选中时的值,inactiveValue 为未选中时的值。
配置 filter 为 'number' 时,默认 activeValue 为 1,inactiveValue 为 0。
设置 useLabel 为 true 时,不显示 text 内容,由外部 label 控制显示。
checkbox-group 元素能把多个 checkbox 管理为一组,绑定值为数组类型。
在 options 中设置 disabled: true 可禁用该选项。