import * as React from 'react'; import { LabelValueItemInterface } from '../_utils/interfaces'; import { ObjectInterface } from '../_utils/interfaces'; import './style/check-list.css'; export interface CheckListProps { /** 搜索栏的显隐 */ hideSearch?: boolean; /** 类型 */ type?: 'assist-bg' | 'menu-bg'; /** 单元的展示模式 */ mode?: 'plain' | 'normal'; /** 列表单选(使用allSelectLabel后该属性失效) */ radio?: boolean; /** 设置搜索框的大小 */ size?: 'compact'; /** 设置列表的标题 */ text?: React.ReactNode; /** 设置列表高度 */ listHeight?: number; /** 列表加载 */ loading?: boolean; /** 绑定值 */ value?: (string | boolean)[]; /** 默认绑定值 */ defaultValue?: string[]; /** 提供全选的功能,传入文案即拥有此功能 */ allSelectLabel?: React.ReactNode; /** 选择项,可直接传字符串数组或者对象数组 */ options?: (LabelValueItemInterface | string)[]; /** 选项变化时的回调函数 */ onChange?: (selected: (string | boolean)[]) => void; /** 类名 */ className?: string; /** 列表单元的类名 */ itemClassName?: string; /** 标题类名 */ listDescriptionClassName?: string; /** 列表label字段的关键值 */ labelKey?: string; /** 列表value字段的关键值 */ valueKey?: string; /** 列表的最大高度 */ maxHeight?: number; /** 每一列的高度 */ rowHeight?: number; /** 是否自适应高度(会使最大高度失效) */ flexHeight?: boolean; /** 列表空状态显示 */ noContentText?: string; /** 搜索条件未命中显示 */ noResultText?: string; /** 搜索占位 */ placeholder?: string; /** 列表筛选 */ filterList?: (options: LabelValueItemInterface, search: string) => LabelValueItemInterface[]; /** 列筛选 */ filterItem?: (val: LabelValueItemInterface, search: string) => boolean; /** 自定义渲染列显示 */ renderer?: (checked: boolean, title: string, value: string, item: ObjectInterface) => React.ReactNode; /** 列表勾选框显隐 */ showCheckbox?: boolean; /** 列表动态高度(同Table) */ dynamicRowHeight?: boolean; /** 列高度最小值 */ minRowHeight?: number; /** 搜索后缀 */ searchExtra?: React.ReactNode; /** 是否显示tip提示 */ showTip?: boolean; /** 搜索回调 */ onSearch?: (value: string) => void; } declare const CheckList: React.FC; export default CheckList; declare const CheckListMemo: React.NamedExoticComponent; export { CheckListMemo };