UNPKG

yanzhen-design-vue

Version:

112 lines (111 loc) 4.55 kB
import { UploadFileType } from './types'; import { SetupContext } from 'vue'; import { UploadFilePreviewEmits, UploadFilePreviewProps } from './upload-file-preview'; export declare function useUploadFilePreview(props: Partial<UploadFilePreviewProps>, emit?: SetupContext<UploadFilePreviewEmits>['emit']): { readonly _ref: import('vue').Ref<any, any>; readonly useDrawer: import('vue').ComputedRef<boolean>; readonly propsRef: import('vue').ComputedRef<Pick<Partial<UploadFilePreviewProps>, "title" | "visible" | "width" | "fileList">>; readonly visible: import('vue').Ref<import('@yanzhen-libs/utils-vue').EpPropMergeType<BooleanConstructor, unknown, unknown>, import('@yanzhen-libs/utils-vue').EpPropMergeType<BooleanConstructor, unknown, unknown>>; readonly drawerConfigRef: import('vue').ComputedRef<{ title: string; width: import('@yanzhen-libs/utils-vue').EpPropMergeType<import('vue').PropType<string | number>, unknown, unknown>; }>; readonly fileListRef: import('vue').Ref<{ originInfo?: { [x: string]: any; fileIcon?: string; fileName?: string; fileAddress?: string; url?: string; name?: string; createUserName?: string; insertTimeForHis?: string; }; isImage?: boolean; uid: string; size?: number; name: string; fileName?: string; lastModified?: number; lastModifiedDate?: Date; url?: string; status?: import('ant-design-vue/es/upload/interface').UploadFileStatus; percent?: number; thumbUrl?: string; crossOrigin?: import('vue').ImgHTMLAttributes["crossorigin"]; originFileObj?: { readonly lastModifiedDate: Date; uid: string; readonly lastModified: number; readonly name: string; readonly webkitRelativePath: string; readonly size: number; readonly type: string; arrayBuffer: () => Promise<ArrayBuffer>; bytes: () => Promise<Uint8Array>; slice: (start?: number, end?: number, contentType?: string) => Blob; stream: () => ReadableStream<Uint8Array>; text: () => Promise<string>; }; response?: any; error?: any; linkProps?: any; type?: string; xhr?: any; preview?: string; }[], UploadFileType<any>[] | { originInfo?: { [x: string]: any; fileIcon?: string; fileName?: string; fileAddress?: string; url?: string; name?: string; createUserName?: string; insertTimeForHis?: string; }; isImage?: boolean; uid: string; size?: number; name: string; fileName?: string; lastModified?: number; lastModifiedDate?: Date; url?: string; status?: import('ant-design-vue/es/upload/interface').UploadFileStatus; percent?: number; thumbUrl?: string; crossOrigin?: import('vue').ImgHTMLAttributes["crossorigin"]; originFileObj?: { readonly lastModifiedDate: Date; uid: string; readonly lastModified: number; readonly name: string; readonly webkitRelativePath: string; readonly size: number; readonly type: string; arrayBuffer: () => Promise<ArrayBuffer>; bytes: () => Promise<Uint8Array>; slice: (start?: number, end?: number, contentType?: string) => Blob; stream: () => ReadableStream<Uint8Array>; text: () => Promise<string>; }; response?: any; error?: any; linkProps?: any; type?: string; xhr?: any; preview?: string; }[]>; readonly imageListRef: import('vue').ComputedRef<import('./use-upload-image-preview').UploadPreviewImage[]>; readonly exposeCtx: { open: (file?: UploadFileType) => void; close: (e?: MouseEvent | KeyboardEvent) => void; previewFile: (file: UploadFileType) => void; }; readonly handlePreviewFile: (file: UploadFileType) => void; readonly handleDownloadFile: (file: UploadFileType) => Promise<void>; readonly handleOpenPreviewFile: (file?: UploadFileType) => void; readonly handleClosePreviewFile: (e?: MouseEvent | KeyboardEvent) => void; readonly loading: import('vue').Ref<boolean, boolean>; };