UNPKG

element-plus

Version:

A Component Library for Vue 3

48 lines (47 loc) 2 kB
/// <reference types="node" /> import type { ShallowRef } from 'vue'; import type { UploadContentInstance } from './upload-content'; import type { UploadFile, UploadProps, UploadRawFile, UploadStatus } from './upload'; export declare const useHandlers: (props: UploadProps, uploadRef: ShallowRef<UploadContentInstance | undefined>) => { abort: (file: UploadFile) => void; clearFiles: (states?: UploadStatus[]) => void; handleError: (err: import("./ajax").UploadAjaxError, rawFile: UploadRawFile) => void; handleProgress: (evt: import("./upload").UploadProgressEvent, rawFile: UploadRawFile) => void; handleStart: (rawFile: UploadRawFile) => void; handleSuccess: (response: any, rawFile: UploadRawFile) => unknown; handleRemove: (file: UploadFile | UploadRawFile, rawFile?: UploadRawFile | undefined) => void; submit: () => void; uploadFiles: import("vue").Ref<{ name: string; percentage?: number | undefined; status: UploadStatus; size?: number | undefined; response?: unknown; uid: number; url?: string | undefined; raw?: { uid: number; readonly lastModified: number; readonly name: string; readonly webkitRelativePath: string; readonly size: number; readonly type: string; arrayBuffer: { (): Promise<ArrayBuffer>; (): Promise<ArrayBuffer>; }; slice: { (start?: number | undefined, end?: number | undefined, contentType?: string | undefined): Blob; (start?: number | undefined, end?: number | undefined, contentType?: string | undefined): Blob; }; stream: { (): ReadableStream<any>; (): NodeJS.ReadableStream; }; text: { (): Promise<string>; (): Promise<string>; }; } | undefined; }[]>; };