UNPKG

@bos-alpha/progress

Version:

进度管理

47 lines (46 loc) 1.14 kB
export declare function calcSize(size: number): string; /** * 获取本地 */ export declare function getItem(name: string): any; /** * 存储本地 */ export declare function setItem<T>(name: string, value: T): void; /** * 删除本地 */ export declare function removeItem(name: string): void; /** * 清空所有本地数据 * */ export declare function clearItem(): void; /** * 生成随机数 */ export declare function uuid(): string; /** * 转换base64 * */ export declare function getBase64(file: any): Promise<unknown>; /** * 简易路由跳转 * @param path 路径 */ export declare const redirect: (path: string) => void; /** * object序列化 * @param obj object */ export declare const obj2Param: (obj: object) => string; /** * 文件下载(导出) * @param url 下载链接 * @param fileName 文件名 */ export declare const linkClick: (url: string, fileName?: string) => void; export declare const createDownload: ({ data, filename }: { data: Blob; filename: undefined | string; }) => void; export declare const loadJsCss: (type: 'js' | 'css', id: string, src: string) => Promise<String>;