UNPKG

@ray-js/smart-ui

Version:

轻量、可靠的智能小程序 UI 组件库

37 lines (36 loc) 803 B
import { SmartComponent, SmartEventHandler } from '../base'; export interface SmartCheckboxGroupProps { /** * 在表单内提交时的标识符 */ name?: string; /** * 所有选中项的`name` */ value?: string[]; /** * 是否禁用所有单选框 * * @default false */ disabled?: boolean; /** * 设置最大可选数 * * `0`为无限制 * * @default 0 */ max?: number; /** * 排列方向 */ direction?: 'horizontal' | 'vertical'; } export interface SmartCheckboxGroupEvents { /** * 当绑定值变化时触发的事件 */ onChange?: SmartEventHandler<string[]>; } export type SmartCheckboxGroup = SmartComponent<SmartCheckboxGroupProps, SmartCheckboxGroupEvents>;