import React from 'react'; import { AnyKeyProps } from './types/AnyKeyProps'; import { Option } from './AyForm/ay-form'; /** * 拷贝对象 * @param obj */ export declare const copy: (obj: AnyKeyProps) => any; /** * 获取随机数 * @param min 最小随机数 * @param max 最大随机数 */ export declare const getRandom: (min: number, max: number) => number; /** * 获取随机数(带小数) * @param min 最小随机数 * @param max 最大随机数 */ export declare const getRandomFloor: (min: number, max: number) => number; /** * 是否是对象 * @param obj 判断对象 */ export declare const isObj: (obj: any) => boolean; /** * 是否是方法 * @param func 判断对象 */ export declare const isFunc: (func: any) => boolean; /** * 清空对象的 undefined 和 null * @param params 要清空的对象 */ export declare const clearEmpty: (params: AnyKeyProps) => AnyKeyProps; interface ListToTreeProps { /** 数据源 */ data: Array; /** 父节点 key */ parentKey?: string; /** 标题 key */ labelKey?: string; /** 子节点 key */ childrenKey?: string; /** 值 key */ valueKey?: string; /** 跟节点值 */ rootValue?: string | null; /** 是否拥有 children */ keepLeaf?: boolean; } /** * 列表转树结构 * @param props 配置参数 */ export declare const listToTree: (props: ListToTreeProps) => AnyKeyProps[]; export declare const getLabelByValue: (type: number | undefined, options: AnyKeyProps) => any; /** * 数字转金额 * @param value 金额 */ export declare const getCurrencyValue: (value: any) => string; /** * 通过选项列表把 value 变成 label * @param value 当前值 * @param options 选项列表 */ export declare const getValueByOptions: (value: any, options: Array