Skip to content

复选框组


image

介绍

在一组可复选数据中,用户可通过复选框选择一个或多个数据。

API

Props

参数名描述类型默认值
status状态'default' |'disabled'| 'hide'|'readonly''default'
title标题string'复选框'
showLabel显示标题booleantrue
width字段占比'25%'|'50%'|'75%'|'100%''100%'
labelWidth标签宽度string-
value默认值string-
name数据字段string-
limit最大选择数量number-
direction排列方式'horizontal'|'vertical''horizontal'
isColor彩色, 选项及选择结果以不同颜色呈现booleanfalse
options选项配置Options-
baseStyle自定义样式 , 表格整体自定义样式string-
customClass类名绑定 , 绑定类的名称string-
boxStyle盒模型 , margin,border,padding设置BoxStyle-
uniqueKey唯一标识 , 组件的唯一标识string-
customRender自定义复选框内容booleanfalse
renderFunc自定义复选框内容渲染函数Function'function render(ctx, params) {\n // 返回jsx渲染内容\n return {params.item.value}\n}'
extra补充说明string-
tip气泡提醒string-
validate校验Validate-
loop循环, 循环渲染设置Loop-

Props-选项配置

参数名描述类型默认值
key选项值string-
value标题string-
color颜色'default'|'cyan'|'red'| 'green'|'lime'|
'orange'|'orangered'|'gold'|'purple'|
'magenta'|'blue'|'gray'|'pinkpurple'
-
default默认选中booleanfalse
disabled禁用boolean-

Events

事件名描述参数
onChange值发生改变时ctx
params: {value: string[],checked:boolean,checkedKey:string}
loop:LoopParams

Type

javascript
// 选项配置
type Options = {
  "key":string,
  "value":string,
  "default":boolean,
  "color":"default"\|"cyan"\|"red"\|"green"\|"lime"\|"orange"\|"orangered"\|"gold"\|"purple"\|"magenta"\|"blue"\|"gray"\|"pinkpurple",
  "disabled":boolean
}