import { Button } from 'antd';

export const MyExport = (props: any) => {
  const handleExport = () =>
    props?.keyParams
      ? props?.download?.({ download_type: 'query', ...props?.item })
      : props?.download?.Export?.({
          download_type: 'query',
          ...props?.item,
        });

  return (
    <Button type="primary" onClick={handleExport}>
      {props?.title || '导出'}
    </Button>
  );
};
