UNPKG

comic-plus

Version:

<p align="center"> <img width="200px" src="./logo.png"/> </p>

42 lines (41 loc) 1.25 kB
/** * @description: 防抖 * @param {Function} func * @param {number} interval */ declare function debounce(func: (...args: any) => void, interval?: number): (...args: any) => void; /** * @description: 节流 * @param {Function} func * @param {number} interval */ declare function throttle(func: (...args: any) => void, interval?: number): (...args: any) => void; /** * @description: 补0操作 * @param {number | string} value */ declare const repairZero: (value: number | string) => string; /** * @description: 日期格式化 * @param {any} timestamp * @param {string} fmt */ declare const formatDate: (timestamp: any, fmt?: string) => string; /** * @description: 判断两个对象是否相等 包含proxy代理的对象 * @param {any} o1 * @param {any} o2 */ declare const deepEqual: (o1: any, o2: any) => boolean; /** * @description: 获取高度值,判断是否是number类型,如果是则返回携带px的高度,否则返回自身 * @param {any} height * @return {*} */ declare const getCssHeight: (height: any) => any; /** * @description: 生成随机颜色 * @return {*} */ declare const randomColor: () => string; export { debounce, throttle, repairZero, formatDate, deepEqual, getCssHeight, randomColor };