import { SizeType } from 'antd/lib/config-provider/SizeContext'; import type { ColumnsType, TablePaginationConfig } from 'antd/lib/table/interface'; import * as React from 'react'; import './index.less'; import 'antd/dist/antd.variable.min.css'; export declare type DropdownTableProps = { /** table列配置 */ columns?: ColumnsType; /** 单选 多选 */ mode?: 'radio' | 'checkbox'; /** 选择框默认文本 */ placeholder?: string | ''; /** 选择框的value */ optionValueProp?: string | 'value'; /** 回填到选择框的 Option 的属性值,默认是 Option 的子元素。 比如在子元素需要高亮效果时, 此值可以设为 value */ optionLabelProp?: string | 'label'; /** 搜索框默认文本 */ searchPlaceholder?: string; /** 限制最多选择几个 */ limit?: number | undefined; /** value 变化时,调用此函数 */ onChange?: (value: string[]) => void; /** 下拉框样式 */ dropdownStyle?: React.CSSProperties; /** 设置默认选项,在需要回填时使用 */ defaultOptions?: { value: string; label: string; }[]; /** 设置值 */ value?: string[]; /** 下拉表的table的参数props */ tableProps?: { dataSource: T[]; loading: boolean; onChange?: (pagination?: TablePaginationConfig, filters?: any, sorter?: any) => void; pagination?: TablePaginationConfig | false; [key: string]: any; }; /** 搜索时调用此函数 */ onSearch?: (keyword: string) => void; /** 是否禁用 */ disabled?: boolean; /** cell禁用的keys */ disableKeys?: string[]; /** 是否隐藏搜索栏 */ isHiddenSearchBar?: boolean; /** 选择回调函数 */ onSelect?: (value: string[], data: T[], record: T | T[]) => void; /** 最多显示多少个 tag,响应式模式会对性能产生损耗 */ maxTagCount?: number | 'responsive'; /** 支持清除 */ allowClear?: boolean; /** 是否显示下拉小箭头 */ showArrow?: boolean; /** 选择框大小 */ size?: SizeType; /** 是否展开下拉框 */ open?: boolean; }; declare const DropdownTable: >({ columns, mode, placeholder, optionValueProp, optionLabelProp, searchPlaceholder, limit, onChange, tableProps, dropdownStyle, defaultOptions, value, isHiddenSearchBar, onSelect, maxTagCount, allowClear, showArrow, disableKeys, disabled, size, open, }: DropdownTableProps) => JSX.Element; export default DropdownTable;