import { App } from 'vue' import { MaliUtils, MlUtilsCore } from './utils' import { MaliStorage, MlStorageCore } from './storage' import { MaliModal } from './modal' import { MaliToast } from './toast' import { MaliLoading } from './loading' import { MaliWebview, MlWebviewCore } from './webview' import { MaliI18n, MlI18nCore } from './i18n' import { MaliClipboard, MlClipboardCore } from './clipboard' export interface ConfigOptions { version?: number size?: string | null // 全局仓库标识 getStoreId?(params: any): string | number // 全局zindex zIndex?(): number // 权限控制 checkPermission?(params: any): boolean // 审批组件 approval?: { select?: any record?: any types?: { value: number | string label: string color?: string background?: string }[] }, // 发票组件 invoice?: { types?: { value: number | string label: string }[] }, // 输入框 input?: { size: string | null [key: string]: any }, // 按钮 button?: { size: string | null [key: string]: any }, // 加载中 loading?: { showMethod?(options: any): Promise hideMethod?(): Promise } // 轻提示框 toast?: { successMethod(options: any): Promise errorMethod(options: any): Promise warningMethod(options: any): Promise hideMethod(): Promise } // 上传组件 upload?: { limitSize?: number fileProps?: { fileUrl?: string fileType?: string fileName?: string }, // 获取附件缩略图方法 getThumbnailFileUrl?(params: { item: any params: any }): string // 获取附件路径方法 getFileUrl?(params: { item: any params: any }): string // 上传附件方法 uploadFile?(params: { file: File, params: any }): Promise // 附件预览方法 previewFile?(params: { item: any params: any }): Promise // 下载附件方法 downloadFile?(params: { item: any params: any }): Promise // 删除附件方法 removeFile?(params: { item: any params: any }): Promise }, // 分页组件 pager?: { pageSize?: number pageSizes?: number[] layouts?: string[] resProps?: { card?: string | ((params: { response: any }) => any) result?: string | ((params: { response: any }) => any[]) total?: string | ((params: { response: any }) => number | string) } [key: string]: any }, // 高级表格 grid?: { showTool?: boolean showHeadMenu?: boolean pageProps?: { pageSize?: string currentPage?: 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 [key: string]: any }, loadMore?: { pageSize?: number resProps?: { card?: string | ((params: { response: any }) => any) result?: string | ((params: { response: any }) => any[]) total?: string | ((params: { response: any }) => number | string) } [key: string]: any }, notData?: { [key: string]: any }, listSelectUserPage?: { [key: string]: any } provincesPicker?: { jsonUrl?: string } [key: string]: any } export const MaliUI: { version: string // config(options: ConfigOptions): any install(app: App): void MaliUtils: MlUtilsCore MaliToast: typeof MaliToast MaliModal: typeof MaliModal MaliLoading: typeof MaliLoading MaliI18n: MlI18nCore MaliStorage: MlStorageCore MaliWebview: MlWebviewCore MaliClipboard: MlClipboardCore } export { MaliUtils, MaliToast, MaliModal, MaliLoading, MaliI18n, MaliStorage, MaliWebview, MaliClipboard } export default MaliUI