Upload.d.ts 845 B

12345678910111213141516171819202122232425262728
  1. import React, { Component } from 'react';
  2. import AjaxUpload from './AjaxUploader';
  3. import type { UploadProps, RcFile } from './interface';
  4. declare function empty(): void;
  5. declare class Upload extends Component<UploadProps> {
  6. static defaultProps: {
  7. component: string;
  8. prefixCls: string;
  9. data: {};
  10. headers: {};
  11. name: string;
  12. multipart: boolean;
  13. onStart: typeof empty;
  14. onError: typeof empty;
  15. onSuccess: typeof empty;
  16. multiple: boolean;
  17. beforeUpload: any;
  18. customRequest: any;
  19. withCredentials: boolean;
  20. openFileDialogOnClick: boolean;
  21. hasControlInside: boolean;
  22. };
  23. private uploader;
  24. abort(file: RcFile): void;
  25. saveUploader: (node: AjaxUpload) => void;
  26. render(): React.JSX.Element;
  27. }
  28. export default Upload;