UNPKG

yanzhen-design-vue

Version:

116 lines (115 loc) 4.09 kB
import { UploadFileType } from './types'; import { SetupContext } from 'vue'; import { UploadImagePreviewEmits, UploadImagePreviewProps } from './upload-image-preview'; export interface UploadPreviewImage { uid: string | number; src?: string; width?: number; visible?: boolean; onVisibleChange?: (visible: boolean) => void; [key: string]: any; } export declare function useUploadImagePreview(props: Partial<UploadImagePreviewProps>, emit?: SetupContext<UploadImagePreviewEmits>['emit']): { isImageUrl: (file: UploadFileType) => boolean; id: import('vue').Ref<unknown, unknown>; preview: import('vue').ComputedRef<false | { visible: boolean; onVisibleChange(visible: boolean): void; }>; 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; }[]>; imageListRef: import('vue').ComputedRef<UploadPreviewImage[]>; exposeCtx: { close: () => void; open: (file?: UploadFileType) => void; previewImage: (file: import('ant-design-vue').UploadFile<any>) => void; }; handleOpenPreviewImage: (file?: UploadFileType) => void; handleClosePreviewImage: () => void; handlePreviewImage: (file: import('ant-design-vue').UploadFile<any>) => void; };