feat: funjia工具库v1.0.0版本

This commit is contained in:
2024-08-25 16:31:47 +08:00
commit 07908bb596
16 changed files with 601 additions and 0 deletions
Vendored
+28
View File
@@ -0,0 +1,28 @@
/**
* 根据指定类型生成新类型的数据
* @param originalInfo 原始数据,需要转换类型的数据
* @param newInfo 转换类型之后的数据
*/
export declare function parseType<T>(originalInfo: any, newInfo: any, mapper?: [string[], string[]] | null): T;
/**
* 尝试获取子属性的值并且出错时可返回指定类型的默认值
* 链式获取数据
* {children:{children:{name,age}}} 获取name的值
* tryValue({children:{chidren:{name,age}}},["children","children","name"],"--")
* @param obj 原始对象
* @param names 按层级排列的子属性
* @param defV 指定返回的默认值
*/
export declare const tryValue: (obj: Array<any> | Object, names: any[], defV?: any) => any;
export declare const tV: (obj: Array<any> | Object, names: any[], defV?: any) => any;
/**
* 格式化表单
* 方法实现参考地址:https://www.cnblogs.com/yaowen/p/5574923.html
*/
export declare const formatForm: (data: any, defValue?: any) => any;
export declare const fF: (data: any, defValue?: any) => any;
/**
* 转换为数字
*/
export declare const parseNumber: (value: any) => number;
//# sourceMappingURL=parse.d.ts.map