/// import moment from 'dayjs'; /** * 将例如像 a.b.c 或 a[1].b 的字符串转换为路径数组 * * @param string 要转换的字符串 */ export declare const keyToPath: (string: string) => any[]; export declare function noop(): void; interface PlainObject { [propsName: string]: any; } export declare function rmUndefined(obj: PlainObject): PlainObject; export declare function getRange(min: number, max: number, step?: number): any[]; export declare function convertArrayValueToMoment(value: number[], types: string[], mom: moment.Dayjs): moment.Dayjs; export declare function removeHTMLTag(str: string): string; export declare const throttle: (fn: Function, wait?: number) => Function; export declare const debounce: (fn: Function, wait?: number) => () => void; export declare const gRowFields: (rowFields: any[]) => any; /** * 将时间戳转换成年月日时分秒 * @param time 时间戳 */ export declare function transformDate(time: number): { year: number; month: number; day: number; week: number; hours: number; minute: number; second: number; date: string; }; /** * 智能显示时间 * @params {number} time 需要转换的时间戳 * @params {number?} now 参考时间戳 */ export declare function displayTime(time: number, now?: number): string; export declare function createObject(superProps?: { [propName: string]: any; }, props?: { [propName: string]: any; }, properties?: any): object; export declare function cloneObject(target: any, persistOwnProps?: boolean): any; export declare function string2regExp(value: string, caseSensitive?: boolean): RegExp; /** * 生成 8 位随机数字。 * * @return {string} 8位随机数字 */ export declare function guid(): string; /** * 对比两个对象上的指定是否不一样 * @param attrs 指定属性 * @param from 对象1 * @param to 对象2 * @param strictMode 是否开启全等 默认开启 * @returns {boolean} 不一样会返回ture */ export declare function anyChanged(attrs: string | Array, from: { [propName: string]: any; }, to: { [propName: string]: any; }, strictMode?: boolean): boolean; export declare function getScrollbarWidth(): number; export declare function pickEventsProps(props: any): any; export declare function getScrollParent(node: HTMLElement): HTMLElement | null; export declare function range(num: number, min: number, max: number): number; export declare function camel(str?: string): string; /** * 基于时间戳的 uuid * * @returns uniqueId */ export declare const uuid: () => string; export declare const uuidv4: () => string; export declare function hasAbility(schema: any, ability: string, data?: object, defaultValue?: boolean): boolean; export declare function isVisible(schema: { visibleOn?: string; hiddenOn?: string; visible?: boolean; hidden?: boolean; }, data?: object): boolean; export declare function setVariable(data: { [propName: string]: any; }, key: string, value: any): void; export declare function deleteVariable(data: { [propName: string]: any; }, key: string): void; export declare function hasFile(object: any): boolean; export declare function qsstringify(data: any, options?: any, keepEmptyArray?: boolean): string; export declare function isEmpty(thing: any): boolean; export declare function getPropValue(props: T, getter?: (props: T) => any): any; export declare function object2formData(data: any, options?: any, fd?: FormData): any; export declare function sleep(dely?: number): Promise; export declare function set16ToRgb(str: string, alpha?: number): string; export declare function isClickOnInput(e: React.MouseEvent): boolean; /** * 将容器滚动至指定位置 * @param {HTMLElement} element 目标滚动元素 * @param {Object} options 参数对象 * @param {Number} options.top 滚动到的目标垂直位置,默认为0 * @param {Number} options.left 滚动到的目标水平位置,默认为0 * @param {Function} callback 滚动结束后执行的回调函数 */ export declare const smoothScrollTo: (element: Element, options: Object, callback: Function) => void; export {};