import DropdownButtons from '@/components/drop-down-buttons'; import { DeleteOutlined, DownloadOutlined, PlusOutlined } from '@ant-design/icons'; import { useIntl } from '@umijs/max'; import { Button, Space } from 'antd'; import React from 'react'; export interface RightActionsProps { handleDeleteByBatch: () => void; handleClickPrimary?: () => void; handleSettingFields?: () => void; handleExport?: () => void; settingButton?: React.ReactNode; buttonText?: string; rowSelection: { selectedRowKeys: React.Key[]; }; } const RightActions: React.FC = ({ handleDeleteByBatch, handleClickPrimary, handleSettingFields, handleExport, settingButton, buttonText, rowSelection }) => { const intl = useIntl(); const ButtonList = [ { label: 'common.button.export', key: 'export', icon: }, { label: 'common.button.delete', key: 'delete', props: { danger: true }, icon: } ]; const handleActionSelect = (val: string) => { if (val === 'delete') { handleDeleteByBatch(); } else if (val === 'export') { handleExport?.(); } }; return ( {/* */} {/* {settingButton} */} {/* */} 0 && ( ({rowSelection.selectedRowKeys.length}) ) } size="large" showText={true} disabled={!rowSelection.selectedRowKeys.length} onSelect={handleActionSelect} /> ); }; export default RightActions;