/** * 防抖函数 * @param func 需要防抖的函数 * @param delay 延迟时间 * @param immediate 是否立即执行 * @returns {execute: T; cancel: () => void} */ export declare function debounce void>(func: T, delay: number, immediate?: boolean): { execute: T; cancel: () => void; }; /** * 随机生成字符串 * len 指定生成字符串长度 */ export declare const getRandomString: (len: number) => string; export declare const tryCopy: (copyWrapper: any) => void; export declare const copyText: (copyStr: string) => void; export declare const $emit: (name: any, params: any) => void; export declare const $on: (name: any, work: any) => void; export declare const popupManager: { nextIndex(): number; }; /** * 将 px 单位转换为 number * @param measurement 长度 '20px' | 20 */ export declare const transformPxToNumber: (measurement: number | string) => number; /** 数字 => px 字符串 */ export declare const toPx: (px?: string | number) => string; /** 生成唯一ID */ export declare function generateUid(): number; /** * 解析对象路径 'a.[1].b'==>['a',1,'b'] * @param path * @returns */ export declare function parsePath(path: string): (string | number)[]; /** * 设置对象属性by path * @param obj * @param path * @param value * @returns */ export declare function setObjByPath(obj: object, path: string | string[], value?: any): object; /** * 获取对象属性by path * @param obj * @param path * @param value * @returns */ export declare function getObjByPath(obj: object, path: string | string[], value?: any): any; /** *获取对象属性by path * @param obj * @param path * @param defaultVal * @returns */ export declare function getObjVal(obj: object, path: string | string[], defaultVal?: any): { value: any; }; /** * 深拷贝 * @param target * @param chache * @returns */ export declare function deepClone(target: unknown, chache?: WeakMap): any;