import { ReactNode, ReactText } from 'react'; import { AnyKeyProps } from '../../types/AnyKeyProps'; interface Row extends AnyKeyProps { } interface UseSelectionProps { /** 表格 rowKey */ rowKey?: ((record: AnyKeyProps) => string) | string; /** ☑️表格选择框类型 */ selectionType?: 'checkbox' | 'radio'; /** 📢表格选择改变触发事件 */ onSelectionChange?(selection: Array, selectionKeys: Array): void; /** 选中显示的名称 */ selectShowKey?: string; /** 选择功能的配置 */ rowSelection?: AnyKeyProps; } interface UseSelectionReturns { /** 头部元素 */ header: ReactNode; /** 只有消息部分 */ message: ReactNode; /** 生成的 antd rowSelection */ tableRowSelection: AnyKeyProps | undefined; /** ☑️已选中的选项 */ selection: Array; /** 清空所有选项 */ clearSelection(): void; /** 设置选中的项 */ setSelection(selection: Array): void; /** 添加选中的项 */ addSelection(selection: Array): void; /** 移除选项 */ removeSelection?(i: number | null, record?: AnyKeyProps): void; } export default function useSelection(_props: UseSelectionProps): UseSelectionReturns; export {};