import { CSSProperties } from 'react'; /** * @param num 需要补零的数字 * @param n 需要的长度 * @returns 补零后的字符串 */ export declare function PrefixZero(num: number, n: number): string; /** * 数值四舍五入 * @param number 值 * @param decimal 保留位数 * @returns */ export declare function numberRound(number: number, decimal: number): string | number; /** * 将数值格式化成金额形式 * @param num 数值(Number或者String) * @param precision 精度,默认不变 * @param separator 分隔符,默认为逗号 * @param numberbits 数据位数 * @param rounding 是否开启四舍五入 * @return 金额格式的字符串,如'1,234,567',默认返回NaN * @type String */ export declare function formatNumber(num: any | string, precision?: number, separator?: string, digit?: number, numberbits?: number, rounding?: boolean): string; export declare const colorHex: (rgb: any) => any; /** * 颜色格式 hex 转 rgba * @param bgColor * @returns rgba(....) */ export declare const hexToRgba: (bgColor: string, opacity?: number) => string; export declare const rgbaRegX: (bgColor: string, opacity?: number) => string; /** * * @param obj rgba{} * @returns rgba(0,0,0,1) */ export declare const forMatRgba: (obj: any) => string; /** * * @param colorObj 颜色对象 * @param colorType 颜色类型 * @returns {color:'rgba()',colorType:xxxx} */ export declare const getColorObj: (colorObj: any) => { color: string; colorType: 'single' | 'gradient'; }; /** * @param name 随机字符串前缀 * @returns */ export declare const randomChar: (name?: string) => string; export declare const alignType: { top: string; center: string; bottom: string; left: string; right: string; }; export declare const dayName: string[]; export declare const abridgeDayName: string[]; export declare const monName: string[]; /** * 解析表达式 '{c1} > 0' * @param str 表达式字符串 * @param target 对象 * @returns 解析后的得到的值 */ export declare const analysisExpression: (str: string | boolean | undefined, target: any, id: string, detailType: { name: string; pathArr?: string[]; }) => any; /** * 动态加载js文件 * @param scriptArr */ export declare const loadScript: (scriptArr: any) => void; /** * 检查当前设备是否是移动端 * @param set 传入当前 * @returns */ export declare const resMobile: (set?: any) => "pc" | "mobile"; /** * 获取渐变色 css值 * @param colorObj * @returns string */ export declare const colorFunc: (colorObj: any) => { color: string; colorType: "gradient" | "single"; }; /** * 单选设置选中 * @param data 数据 * @param type 'index' or 'id * @param index * @param defaultId * @returns */ export declare const checkOption: (data: any[], type: 'index' | 'id', index: { value: number | null; }, defaultId: { value: number | string | null; }) => any; /** * 多选选中 */ export declare const multipleselec: (data: any[], type: 'index' | 'id', index: { value: string | null; }, defaultId: { value: string | null; }) => any[]; export declare const carouselActive: (data: any[], type: 'index' | 'id', index: { value: number; }, defaultId: { value: number | string; }) => number; /** * @param props mian * @param path string 'xxxx.xxxx.xxx' * @returns any */ export declare const getComStyle: (props: any, path: string) => any; export declare const loadCompletelyScript: (path: string) => Promise; export declare const getChildCompArr: (target: any, type: string, other?: { dataTypes?: any; type?: "lcz-amap" | "lcz-3d-area-map" | "lcz-earth" | undefined; filter?: boolean | undefined; } | undefined) => any; export declare const getChildComItem: (childComponents: any, _type: any) => any; export declare const myiterator: (target: any[]) => { i: () => Generator; its: () => Generator; } | undefined; export declare const replaceStr: (target: string, symbol: string, rep?: string) => string; /** * 检测val的值是否有意义 * @param val * @returns boolean */ export declare const isEmpty: (value: any) => boolean; export declare const isProEmpty: (value: any) => boolean; export declare const isEmptyData: (data: any[]) => boolean; /** * * @param target 原数据 * @param types 数据类型 {name:'string',value:'number'} * @returns 转换后的数据 */ export declare const conversionData: (target: any[], types: any) => any[]; /** * 获取值在数据范围和尺寸范围的大小 * @param dataRange 数据范围 * @param size 尺寸范围 * @param value 当前的值 * @returns value 在数据范围中的尺寸大小 */ export declare const getSize: (dataRange: { min: number; max: number; }, size: { min: number; max: number; }, value: number) => number; /** * 防抖函数 * @param fn 函数 * @param delay 延时时间 */ export declare function debounce(fn: any, delay: number): (this: any, ...args: any) => void; /** * 深克隆 * @param obj * @returns */ export declare function deepClone(obj: any): any; /** * 比较两个数值的大小 * @param num1 num1 * @param num2 num2 * @returns {min:xxx,max:xxx} */ export declare const compareSize: (num1?: number, num2?: number) => { min: number; max: number; }; /** * 查询同类型子组件数组 用于监听同种子组件 防止其他类型组件渲染 * @param comps 子组件列表 * @param type 子组件类型 * @returns */ export declare const findChildCom: (childComs: any, type: any) => string; /** * 数组去重函数 * @param target 原数组 * @param fields 字段数组 */ export declare const arrDuplicateRemove: (target: any[], fields: string[] | string) => any[]; /** * 匹配换行字符 */ export declare const lineFeedReg: RegExp; /** * 数值是否为空 * @param val * @returns */ export declare const numberIsEmpty: (val: any) => boolean; /** * 判断对象是否为空对象 */ export declare const objectIsEmpty: (obj: any) => boolean; export declare const getVisibilityChangeEvent: () => { hiddenProperty: string; visibilitychange: string; }; /** * 为元素添加样式 * @param target htmlelement * @param style style */ export declare const setStyle: (target: HTMLElement, style?: CSSProperties) => void; /** * 将字符串以指定长度分割成数组 与指定字符拼接 并返回 * @param str 字符串 * @param charts 长度 * @param separator 连接符 * @param truncate 是否截断 * @returns 格式化后的字符串 */ export declare const formatStr: (str: string, charts: number, separator?: string, truncate?: boolean) => string; /** * 获取单个区间颜色 * @param start * @param end * @param value * @param param3 * @returns */ export declare function getSingleSectionColor(start: string, end: string, value?: number, [min, max]?: [number, number]): any; /** * 获取区间颜色值 * @param colors 颜色列表 * @param section 值的区间 * @param step 分成多少份 */ export declare const getSectionColors: (colors: { begins: number; value: string; }[], maxSection?: number, step?: number) => any; /** * 兼容小眼睛 * @param config 眼睛控制所在obj * @param code 原来的属性名 * @param fill 填充的值 * @returns */ export declare const configDisplayCompatible: (config: any, code?: string, fill?: boolean) => any; /** * 比较组件版本 * @param targetV 当前版本 * @param nowV 新的版本 * @returns 是否更新 */ export declare function compareVersion(targetV: string, nowV?: string): boolean; export declare function getTextStyle(textStyle?: TextStyle): CSSProperties; export declare function getMaxOrMin(data: any[], type?: string): { min: number; max: number; }; export declare function fetchData({ url, data, method }: { url: string; data?: any; method?: string; }): Promise;