UNPKG

vue-document-components

Version:

A collection of Vue.js components for document preview, file management, and media handling

85 lines (76 loc) 1.83 kB
import { VueConstructor } from 'vue'; // PDF 预览对话框相关类型 export interface FallbackMessages { loadFailed?: string; downloadTip?: string; } export interface PdfPreviewDialogProps { pdfUrl: string; title?: string; allowDownload?: boolean; filename?: string; downloadText?: string; closeText?: string; newTabText?: string; loadingText?: string; errorMessage?: string; tipText?: string; fallbackMessages?: FallbackMessages; showTips?: boolean; customClass?: string; } // 图片预览对话框相关类型 export interface ImagePreviewDialogProps { imageUrl: string; title?: string; allowDownload?: boolean; filename?: string; downloadText?: string; closeText?: string; loadingText?: string; errorMessage?: string; } // 文件上传器相关类型 export interface FileUploaderProps { uploadAction: string; drag?: boolean; multiple?: boolean; accept?: string; maxSize?: number; limit?: number; showFileList?: boolean; showCustomFileList?: boolean; autoUpload?: boolean; disabled?: boolean; allowPreview?: boolean; allowDownload?: boolean; dragText?: string; clickText?: string; uploadButtonText?: string; tipText?: string; } // 安装选项 export interface InstallOptions { components?: string[]; } // 组件声明 declare const PdfPreviewDialog: any; declare const ImagePreviewDialog: any; declare const FileUploader: any; // 安装函数 export function install(Vue: VueConstructor, options?: InstallOptions): void { // Implementation placeholder } // 默认导出 export default { install, PdfPreviewDialog, ImagePreviewDialog, FileUploader }; // 具名导出 export { PdfPreviewDialog, ImagePreviewDialog, FileUploader };