import { App } from 'vue' import { VxeGlobalRenderer } from 'vxe-table' import { MaliUtils, MlUtilsCore } from './utils' import { MaliStorage, MlStorageCore } from './storage' import { MaliClipboard, MlClipboardCore } from './clipboard' import { MaliXlsx, MlXlsxCore } from './export/xlsx' import { MaliPermission, MaliPermissionCore } from './permission' import { MaliModal } from './modal' import { MaliToast } from './toast' import { MaliNotify } from './notify' import { MaliLoading } from './loading' import './plugins' export interface ConfigOptions { version?: number size?: string | null // 全局仓库标识 getStoreId?(params: any): string | number getFormStoreId?(params: any): string | number // 全局zindex zIndex?(): number // 权限控制 checkPermission?(params: any): boolean // 审批组件 approval?: { types?: { value: number | string label: string color?: string }[] }, // 发票组件 invoice?: { types?: { value: number | string label: string }[] }, // 列表搜索组件 tableFilter?: { operatorOptions?: any[] }, // 输入框 input?: { size: string | null [key: string]: any }, // 按钮 button?: { size: string | null [key: string]: any }, // 上传组件 upload?: { limitSize?: number fileProps?: { fileUrl?: string fileType?: string fileName?: string fileSize?: string }, // 获取附件缩略图方法 getThumbnailFileUrl?(params: { item: any params: any }): string // 获取附件路径方法 getFileUrl?(params: { item: any params: any }): string // 获取预览附件的路径 getPreviewFileUrl?(params: { item: any params: any }): string | Promise // 上传附件方法 uploadFile?(params: { file: File, params: any }): Promise // 下载附件方法 downloadFile?(params: { item: any params: any }): Promise // 删除附件方法 removeFile?(params: { item: any params: any }): Promise // 获取附件真实地址方法 getViewUrl?(fileUrl: String): Promise, // 是否启用office文档预览 showOfficePreview?(): boolean }, // 富文本 editor?: { uploadImage?(params: { file: File, params: any }): Promise<{ url: string alt?: string href?: string }> uploadVideo?(params: { file: File, params: any }): Promise<{ url: string poster?: string }> } // 分页组件 pager?: { pageSize?: number pageSizes?: number[] layouts?: string[] [key: string]: any }, // 高级表格 grid?: { showTool?: boolean showHeadMenu?: boolean autoUpformCollapse?: boolean autoRightformCollapse?: boolean pageProps?: { pageSize?: string currentPage?: string total?: string }, resProps?: { card?: string | ((params: { response: any }) => any) result?: string | ((params: { response: any }) => any[]) total?: string | ((params: { response: any }) => number | string) } [key: string]: any }, // 基础表格 table?: { showTool?: boolean showHeadMenu?: boolean [key: string]: any }, // 金额输入 amountInput?: { digits?: number [key: string]: any }, // 金额格式化 amountText?: { digits?: number wanDigits?: number [key: string]: any }, colorPicker?: { predefineColors?: string[] }, notData?:{ emptyUrl?: string emptyText?: string }, chunkStatistics?: { amountAlign?: string }, notify?: { successMethod?(option: any): any errorMethod?(option: any): any hideMethod?(): any }, loading?: { showMethod?(option: any): any hideMethod?(): any } } export const MaliUI: { version: string config(options: ConfigOptions): any install(app: App): void renderer: VxeGlobalRenderer MaliUtils: MlUtilsCore MaliClipboard: MlClipboardCore MaliXlsx: MlXlsxCore, MaliNotify: typeof MaliNotify MaliToast: typeof MaliToast MaliModal: typeof MaliModal MaliLoading: typeof MaliLoading MaliStorage: MlStorageCore MaliPermission: MaliPermissionCore } export { MaliUtils, MaliClipboard, MaliXlsx, MaliNotify, MaliToast, MaliModal, MaliLoading, MaliStorage, MaliPermission } export * from './icon' export * from './button' export * from './date-picker' export * from './datetime-picker' export * from './quarter-picker' export * from './week-picker' export * from './color-picker' export * from './row' export * from './col' export * from './card' export * from './input' export * from './amount-input' export * from './number-input' export * from './checkbox-group' export * from './radio-group' export * from './radio-button' export * from './grid' export * from './cascader' export * from './form' export * from './select' export * from './switch' export * from './upload' export * from './modal' export * from './toast' export * from './notify' export * from './form' export * from './editor' export * from './textarea' export default MaliUI