复选框

介绍
在一组数据中,用户可通过复选框选择一个或多个数据。
API
Props
参数名 | 描述 | 类型 | 默认值 |
---|---|---|---|
status | 默认状态 | 'default'|'disabled'|'hide'| | 'default' |
title | 标题 | string | - |
value | 默认值 | boolean | false |
indeterminate | 是否为半选状态 | boolean | false |
baseStyle | 自定义样式 , 表格整体自定义样式 | string | - |
customClass | 类名绑定 , 绑定类的名称 | string | - |
uniqueKey | 唯一标识 , 组件的唯一标识 | string | - |
loop | 循环 , 循环渲染设置 | Loop | - |
Events
事件名 | 描述 | 参数 |
---|---|---|
onChange | 值发生改变时 | ctx params:ChangeParamsChangeParams loop:LoopParams |
Type
js
// 循环
type Loop = {
"data": any[],
"paramName": string,
"indexName": string,
"key": string
}
// onChange 参数
type ChangeParams = {
"checked":boolean,
"checkKey":string,
"value":string[]
}[]
// 循环变量数据参数
type LoopParams = {
"indexName":string,
"paramName":string,
"ref":ComputedRefImpl, // 全部的循环变量数据
"row":number,
"rowIndex":number
}[]