import React, { type DragEvent, Component } from 'react'; import PropTypes from 'prop-types'; import Upload from './upload'; import type { DraggerProps } from './types'; /** * Upload.Dragger * IE10+ 支持。继承 Upload 的 API,除非特别说明 */ declare class Dragger extends Component { static propTypes: { prefix: PropTypes.Requireable; locale: PropTypes.Requireable; shape: PropTypes.Requireable; onDragOver: PropTypes.Requireable<(...args: any[]) => any>; onDragLeave: PropTypes.Requireable<(...args: any[]) => any>; onDrop: PropTypes.Requireable<(...args: any[]) => any>; limit: PropTypes.Requireable; className: PropTypes.Requireable; style: PropTypes.Requireable; defaultValue: PropTypes.Requireable; children: PropTypes.Requireable; listType: PropTypes.Requireable; timeout: PropTypes.Requireable; }; static defaultProps: { prefix: string; onDragOver: () => void; onDragLeave: () => void; onDrop: () => void; locale: Partial<{ card: { cancel: string; addPhoto: string; download: string; delete: string; }; drag: { text: string; hint: string; }; upload: { delete: string; }; image: { cancel: string; addPhoto: string; download: string; delete: string; }; }> & { momentLocale?: string | undefined; }; }; uploaderRef: InstanceType; state: { dragOver: boolean; }; onDragOver: (e: DragEvent) => void; onDragLeave: (e: DragEvent) => void; onDrop: (e: File[]) => void; abort(file: File): void; startUpload(): void; saveUploaderRef: (ref: InstanceType | { getInstance: () => InstanceType; } | null) => void; render(): React.JSX.Element; } export default Dragger;