import ajax from './ajax'; import type { PropType } from 'vue'; import type { Nullable } from 'element-plus/es/utils/types'; import type { ListType, UploadFile, ElFile } from './upload.type'; declare type IFileHanlder = (file: Nullable, fileList?: UploadFile[]) => unknown; declare type AjaxEventListener = (e: ProgressEvent, file: ElFile) => unknown; declare const _default: import("vue").DefineComponent<{ type: { type: StringConstructor; default: string; }; action: { type: StringConstructor; required: true; }; name: { type: StringConstructor; default: string; }; data: { type: PropType>; default: () => null; }; headers: { type: PropType>>; default: () => null; }; method: { type: StringConstructor; default: string; }; withCredentials: { type: BooleanConstructor; default: boolean; }; multiple: { type: PropType>; default: null; }; accept: { type: StringConstructor; default: string; }; onStart: { type: PropType<(file: File) => void>; default: (file: File) => void; }; onProgress: { type: PropType; default: AjaxEventListener; }; onSuccess: { type: PropType; default: AjaxEventListener; }; onError: { type: PropType; default: AjaxEventListener; }; beforeUpload: { type: PropType<(file: File) => Promise | boolean | unknown>; default: (file: File) => void; }; drag: { type: BooleanConstructor; default: boolean; }; onPreview: { type: PropType; default: IFileHanlder; }; onRemove: { type: PropType<(file: Nullable, rawFile: ElFile) => void>; default: (file: Nullable, rawFile: ElFile) => void; }; fileList: { type: PropType; default: () => UploadFile[]; }; autoUpload: { type: BooleanConstructor; default: boolean; }; listType: { type: PropType; default: string; }; httpRequest: { type: PropType | PropType<(...args: unknown[]) => Promise>; default: () => typeof ajax; }; disabled: BooleanConstructor; limit: { type: PropType>; default: null; }; onExceed: { type: PropType<(files: FileList, fileList: UploadFile[]) => void>; default: () => void; }; }, { reqs: import("vue").Ref<{ [x: string]: { then: (onfulfilled?: ((value: any) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise; catch: (onrejected?: ((reason: any) => TResult | PromiseLike) | null | undefined) => Promise; finally: (onfinally?: (() => void) | null | undefined) => Promise; readonly [Symbol.toStringTag]: string; } | { onreadystatechange: ((this: XMLHttpRequest, ev: Event) => any) | null; readonly readyState: number; readonly response: any; readonly responseText: string; responseType: XMLHttpRequestResponseType; readonly responseURL: string; readonly responseXML: Document | null; readonly status: number; readonly statusText: string; timeout: number; readonly upload: { addEventListener: { (type: K, listener: (this: XMLHttpRequestUpload, ev: XMLHttpRequestEventTargetEventMap[K]) => any, options?: boolean | AddEventListenerOptions | undefined): void; (type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions | undefined): void; }; removeEventListener: { (type: K_1, listener: (this: XMLHttpRequestUpload, ev: XMLHttpRequestEventTargetEventMap[K_1]) => any, options?: boolean | EventListenerOptions | undefined): void; (type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions | undefined): void; }; onabort: ((this: XMLHttpRequest, ev: ProgressEvent) => any) | null; onerror: ((this: XMLHttpRequest, ev: ProgressEvent) => any) | null; onload: ((this: XMLHttpRequest, ev: ProgressEvent) => any) | null; onloadend: ((this: XMLHttpRequest, ev: ProgressEvent) => any) | null; onloadstart: ((this: XMLHttpRequest, ev: ProgressEvent) => any) | null; onprogress: ((this: XMLHttpRequest, ev: ProgressEvent) => any) | null; ontimeout: ((this: XMLHttpRequest, ev: ProgressEvent) => any) | null; dispatchEvent: (event: Event) => boolean; }; withCredentials: boolean; abort: () => void; getAllResponseHeaders: () => string; getResponseHeader: (name: string) => string | null; open: { (method: string, url: string | URL): void; (method: string, url: string | URL, async: boolean, username?: string | null | undefined, password?: string | null | undefined): void; }; overrideMimeType: (mime: string) => void; send: (body?: Document | XMLHttpRequestBodyInit | null | undefined) => void; setRequestHeader: (name: string, value: string) => void; readonly DONE: number; readonly HEADERS_RECEIVED: number; readonly LOADING: number; readonly OPENED: number; readonly UNSENT: number; addEventListener: { (type: K_2, listener: (this: XMLHttpRequest, ev: XMLHttpRequestEventMap[K_2]) => any, options?: boolean | AddEventListenerOptions | undefined): void; (type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions | undefined): void; }; removeEventListener: { (type: K_3, listener: (this: XMLHttpRequest, ev: XMLHttpRequestEventMap[K_3]) => any, options?: boolean | EventListenerOptions | undefined): void; (type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions | undefined): void; }; onabort: ((this: XMLHttpRequest, ev: ProgressEvent) => any) | null; onerror: ((this: XMLHttpRequest, ev: ProgressEvent) => any) | null; onload: ((this: XMLHttpRequest, ev: ProgressEvent) => any) | null; onloadend: ((this: XMLHttpRequest, ev: ProgressEvent) => any) | null; onloadstart: ((this: XMLHttpRequest, ev: ProgressEvent) => any) | null; onprogress: ((this: XMLHttpRequest, ev: ProgressEvent) => any) | null; ontimeout: ((this: XMLHttpRequest, ev: ProgressEvent) => any) | null; dispatchEvent: (event: Event) => boolean; }; }>; mouseover: import("vue").Ref; inputRef: import("vue").Ref>; abort: (file: any) => void; post: (rawFile: ElFile) => void; handleChange: (e: DragEvent) => void; handleClick: () => void; handleKeydown: () => void; upload: (rawFile: ElFile) => void; uploadFiles: (files: FileList) => void; }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<{ type?: unknown; action?: unknown; name?: unknown; data?: unknown; headers?: unknown; method?: unknown; withCredentials?: unknown; multiple?: unknown; accept?: unknown; onStart?: unknown; onProgress?: unknown; onSuccess?: unknown; onError?: unknown; beforeUpload?: unknown; drag?: unknown; onPreview?: unknown; onRemove?: unknown; fileList?: unknown; autoUpload?: unknown; listType?: unknown; httpRequest?: unknown; disabled?: unknown; limit?: unknown; onExceed?: unknown; } & { type: string; disabled: boolean; name: string; data: Record; drag: boolean; multiple: Nullable; onError: AjaxEventListener; onProgress: AjaxEventListener; action: string; headers: Nullable>; method: string; withCredentials: boolean; accept: string; onStart: (file: File) => void; onSuccess: AjaxEventListener; beforeUpload: (file: File) => Promise | boolean | unknown; onPreview: IFileHanlder; onRemove: (file: Nullable, rawFile: ElFile) => void; fileList: UploadFile[]; autoUpload: boolean; listType: ListType; httpRequest: typeof ajax | ((...args: unknown[]) => Promise); limit: Nullable; onExceed: (files: FileList, fileList: UploadFile[]) => void; } & {}>, { type: string; disabled: boolean; name: string; data: Record; drag: boolean; multiple: Nullable; onError: AjaxEventListener; onProgress: AjaxEventListener; headers: Nullable>; method: string; withCredentials: boolean; accept: string; onStart: (file: File) => void; onSuccess: AjaxEventListener; beforeUpload: (file: File) => Promise | boolean | unknown; onPreview: IFileHanlder; onRemove: (file: Nullable, rawFile: ElFile) => void; fileList: UploadFile[]; autoUpload: boolean; listType: ListType; httpRequest: typeof ajax | ((...args: unknown[]) => Promise); limit: Nullable; onExceed: (files: FileList, fileList: UploadFile[]) => void; }>; export default _default;