跳到主要内容

Checkbox

容器属性

所有组件配置的第一层均支持容器属性

组件属性 componentsProps

NameTypeDefault是否支持 Variable PatternDescription
classNamestring✔️组件的 className
styleobject组件的 style
optionsArray<{ value: string | number, label: string }>可选项
direction'horizontal' | 'vertical'Checkbox 元素的方向
gap'small' | 'middle' | 'large' | number'small'Checkbox 之间的间距

所有其余 componentsProps 将会被传给组件根元素(Checkbox.Group)。

JS API

通过 formApi.getFieldApi() 获取的接口如下:

NameTypeDescription
nodeHTML Element组件的根 DOM 元素