UNPKG

vue-devui

Version:

DevUI components based on Vite and Vue3

232 lines (231 loc) 11.1 kB
import type { IFileResponse } from './upload-types'; import { UploadStatus } from './upload-types'; import './upload.scss'; declare const _default: import("vue").DefineComponent<{ readonly disabled: boolean; readonly multiple: boolean; readonly placeholder: string; readonly modelValue: File[]; readonly webkitdirectory: boolean; readonly autoUpload: boolean; readonly droppable: boolean; readonly oneTimeUpload: boolean; readonly limit: number; readonly onError?: ((v: { file: File; response: unknown; }) => void) | undefined; readonly onChange?: ((files: File[], uploadFiles: File[]) => void) | undefined; readonly onProgress?: ((files: File[], uploadFiles: File[]) => void) | undefined; readonly accept?: string | undefined; readonly uploadOptions?: import("./upload-types").IUploadOptions | undefined; readonly beforeUpload?: ((file: { status: UploadStatus; response: unknown; percentage: number; file: { readonly lastModified: number; readonly name: string; readonly webkitRelativePath: string; readonly size: number; readonly type: string; arrayBuffer: () => Promise<ArrayBuffer>; slice: (start?: number | undefined, end?: number | undefined, contentType?: string | undefined) => Blob; stream: () => ReadableStream<Uint8Array>; text: () => Promise<string>; }; uploadOptions?: { uri: string | { hash: string; host: string; hostname: string; href: string; toString: () => string; readonly origin: string; password: string; pathname: string; port: string; protocol: string; search: string; readonly searchParams: { append: (name: string, value: string) => void; delete: (name: string) => void; get: (name: string) => string | null; getAll: (name: string) => string[]; has: (name: string) => boolean; set: (name: string, value: string) => void; sort: () => void; toString: () => string; forEach: (callbackfn: (value: string, key: string, parent: URLSearchParams) => void, thisArg?: any) => void; entries: () => IterableIterator<[string, string]>; keys: () => IterableIterator<string>; values: () => IterableIterator<string>; [Symbol.iterator]: () => IterableIterator<[string, string]>; readonly size: number; }; username: string; toJSON: () => string; }; method?: string | undefined; maximumSize?: number | undefined; headers?: { [key: string]: string; } | undefined; authToken?: string | undefined; authTokenHeader?: string | undefined; additionalParameter?: { [key: string]: string | Blob; } | undefined; fileFieldName?: string | undefined; checkSameName?: boolean | undefined; withCredentials?: boolean | undefined; responseType?: "text" | "arraybuffer" | "blob" | "json" | undefined; } | undefined; send: (uploadFiles?: any[] | undefined) => Promise<IFileResponse<unknown>>; parallelUploadFiles: (fileFieldName_: string, additionalParameter: Record<string, string | Blob> | undefined) => FormData; oneTimeUploadFiles: (fileFieldName_: string, additionalParameter: Record<string, string | Blob> | undefined, uploadFiles: any[]) => FormData; cancel: () => void; }[]) => boolean | Promise<boolean>) | undefined; readonly dynamicUploadOptionsFn?: ((files: unknown, uploadOptions: unknown) => import("./upload-types").IUploadOptions) | undefined; readonly fileDrop?: ((v: unknown) => void) | undefined; readonly fileOver?: ((v: boolean) => void) | undefined; readonly fileSelect?: ((v: File) => void) | undefined; readonly deleteUploadedFile?: ((v: string) => void) | undefined; readonly onSuccess?: ((v: { file: File; response: unknown; }[]) => void) | undefined; readonly onExceed?: ((files: File[], uploadFiles: File[]) => void) | undefined; readonly onPreview?: ((file: File) => void) | undefined; readonly httpRequest?: ((files: File[]) => void) | undefined; }, () => any, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "fileDrop" | "fileOver" | "fileSelect" | "deleteUploadedFile")[], "update:modelValue" | "fileDrop" | "fileOver" | "fileSelect" | "deleteUploadedFile", import("vue").PublicProps, Readonly<{ readonly disabled: boolean; readonly multiple: boolean; readonly placeholder: string; readonly modelValue: File[]; readonly webkitdirectory: boolean; readonly autoUpload: boolean; readonly droppable: boolean; readonly oneTimeUpload: boolean; readonly limit: number; readonly onError?: ((v: { file: File; response: unknown; }) => void) | undefined; readonly onChange?: ((files: File[], uploadFiles: File[]) => void) | undefined; readonly onProgress?: ((files: File[], uploadFiles: File[]) => void) | undefined; readonly accept?: string | undefined; readonly uploadOptions?: import("./upload-types").IUploadOptions | undefined; readonly beforeUpload?: ((file: { status: UploadStatus; response: unknown; percentage: number; file: { readonly lastModified: number; readonly name: string; readonly webkitRelativePath: string; readonly size: number; readonly type: string; arrayBuffer: () => Promise<ArrayBuffer>; slice: (start?: number | undefined, end?: number | undefined, contentType?: string | undefined) => Blob; stream: () => ReadableStream<Uint8Array>; text: () => Promise<string>; }; uploadOptions?: { uri: string | { hash: string; host: string; hostname: string; href: string; toString: () => string; readonly origin: string; password: string; pathname: string; port: string; protocol: string; search: string; readonly searchParams: { append: (name: string, value: string) => void; delete: (name: string) => void; get: (name: string) => string | null; getAll: (name: string) => string[]; has: (name: string) => boolean; set: (name: string, value: string) => void; sort: () => void; toString: () => string; forEach: (callbackfn: (value: string, key: string, parent: URLSearchParams) => void, thisArg?: any) => void; entries: () => IterableIterator<[string, string]>; keys: () => IterableIterator<string>; values: () => IterableIterator<string>; [Symbol.iterator]: () => IterableIterator<[string, string]>; readonly size: number; }; username: string; toJSON: () => string; }; method?: string | undefined; maximumSize?: number | undefined; headers?: { [key: string]: string; } | undefined; authToken?: string | undefined; authTokenHeader?: string | undefined; additionalParameter?: { [key: string]: string | Blob; } | undefined; fileFieldName?: string | undefined; checkSameName?: boolean | undefined; withCredentials?: boolean | undefined; responseType?: "text" | "arraybuffer" | "blob" | "json" | undefined; } | undefined; send: (uploadFiles?: any[] | undefined) => Promise<IFileResponse<unknown>>; parallelUploadFiles: (fileFieldName_: string, additionalParameter: Record<string, string | Blob> | undefined) => FormData; oneTimeUploadFiles: (fileFieldName_: string, additionalParameter: Record<string, string | Blob> | undefined, uploadFiles: any[]) => FormData; cancel: () => void; }[]) => boolean | Promise<boolean>) | undefined; readonly dynamicUploadOptionsFn?: ((files: unknown, uploadOptions: unknown) => import("./upload-types").IUploadOptions) | undefined; readonly fileDrop?: ((v: unknown) => void) | undefined; readonly fileOver?: ((v: boolean) => void) | undefined; readonly fileSelect?: ((v: File) => void) | undefined; readonly deleteUploadedFile?: ((v: string) => void) | undefined; readonly onSuccess?: ((v: { file: File; response: unknown; }[]) => void) | undefined; readonly onExceed?: ((files: File[], uploadFiles: File[]) => void) | undefined; readonly onPreview?: ((file: File) => void) | undefined; readonly httpRequest?: ((files: File[]) => void) | undefined; }> & Readonly<{ "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined; onFileDrop?: ((...args: any[]) => any) | undefined; onFileOver?: ((...args: any[]) => any) | undefined; onFileSelect?: ((...args: any[]) => any) | undefined; onDeleteUploadedFile?: ((...args: any[]) => any) | undefined; }>, { readonly disabled: boolean; readonly multiple: boolean; readonly onError: (v: { file: File; response: unknown; }) => void; readonly onProgress: (files: File[], uploadFiles: File[]) => void; readonly placeholder: string; readonly modelValue: File[]; readonly webkitdirectory: boolean; readonly autoUpload: boolean; readonly droppable: boolean; readonly fileDrop: (v: unknown) => void; readonly fileOver: (v: boolean) => void; readonly fileSelect: (v: File) => void; readonly deleteUploadedFile: (v: string) => void; readonly onSuccess: (v: { file: File; response: unknown; }[]) => void; readonly onExceed: (files: File[], uploadFiles: File[]) => void; readonly onPreview: (file: File) => void; readonly oneTimeUpload: boolean; readonly limit: number; readonly httpRequest: (files: File[]) => void; }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>; export default _default;