import { UploadOutlined } from '@ant-design/icons'; import { useIntl } from '@umijs/max'; import { Button, Tooltip, Upload } from 'antd'; import React from 'react'; interface UploadAudioProps { accept?: string; maxCount?: number; type?: 'text' | 'primary' | 'default'; icon?: React.ReactNode; size?: 'small' | 'middle' | 'large'; shape?: 'circle' | 'round' | 'default'; onChange?: (data: { file: any; fileList: any[] }) => void; } const UploadAudio: React.FC = (props) => { const { icon, accept, type, size = 'large', shape = 'circle' } = props; const intl = useIntl(); const beforeUpload = (file: any) => { return false; }; const handleOnChange = React.useCallback( (data: { file: any; fileList: any }) => { props.onChange?.(data); }, [] ); return (
); }; export default React.memo(UploadAudio);