@guo514360255/element-lib
Version:
This template should help get you started developing with Vue 3 in Vite.
40 lines (39 loc) • 1.16 kB
TypeScript
/**
* 格式化数字
* @param num 值
* @param round 值为boolean为是否四舍五入 默认 true 为number为保留小数位数 默认 2位小数
* @param toFixed 保留小数 默认 2位小数
*/
export declare const moneyFormat: (num: string | number, round?: boolean | number, toFixed?: number) => string;
export declare const countDown: (time: number, fn: (val: string) => void) => void;
/**
* 清除定时器
*/
export declare const clearCountDown: () => void;
/**
* 颜色hex转RGB
* @param hex
* @param opacity
*/
export declare const hexToRgb: (hex: string, opacity?: number) => string;
/**
* 查找节点
* @param root
* @param target
* @param key
*/
export declare const findNode: (root: any, target: string, key?: string) => any;
/**
* blob 文件刘处理
* @param response 响应结果
* @param fileName 文件名
* @returns
*/
export declare function downloadFile(response: any, fileName: string): void;
/**
* 树形数据转换label/value
* @param data
* @param labelKey
* @param valueKey
*/
export declare const transformLabelValue: (data: any, labelKey?: string, valueKey?: string) => any;