data-vis-ui
Version:
## [使用文档](https://temp-static-domain.jd.com/data-vis-ui)
34 lines (33 loc) • 1.32 kB
TypeScript
/**
* @description: 获取元素在页面距离顶部的偏移量
* @param {element} 元素节点
* @return: Number
*/
export declare const getElementTop: (element: HTMLDivElement) => number;
export declare function setCookie(name: string, value: any): void;
export declare function getCookie(cname: string): string;
export declare function delCookie(name: string): void;
export declare function triggerEvent(el: Element | Window, type: string): void;
/**
* @description: 生成唯一的id
* @param {number} length 长度
* @return:
*/
export declare const genID: () => string;
/**
* @description: 给数据加一个模拟的id,在刚刚获取数据或者新建一条数据的时候
* @param {type}
* @return:
*/
export declare const addId: (data: any[]) => any[];
export declare function hexToRgba(hex: string, opacity: number): string;
export declare function getMinInteger(min: number): number;
export declare function getMaxInteger(max: number): number;
export declare const formdataNumber: (n: number | string | null | undefined) => string;
export declare const colors: string[];
export declare const calDate: () => string[];
export declare const unitDeal: (num: number, unit: string) => {
num: number;
unit: string;
};
export declare const getUrlParams: (url: string) => Record<string, string>;