chowa
Version:
UI component library based on React
49 lines (48 loc) • 2.3 kB
TypeScript
/**
* @license chowa v1.1.3
*
* Copyright (c) Chowa Techonlogies Co.,Ltd.(http://www.chowa.cn).
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
/// <reference types="react" />
export * from './props';
export * from './namespace';
export * from './bubbling';
export * from './diff';
export * from './effect';
export * from './number';
export { default as doms } from './doms';
export { default as ClearButton } from './clear-button';
declare const utils: {
doms: {
rect(ele: HTMLElement): DOMRect | ClientRect;
pageOffset(): import("./doms").Offset;
scrollTop(ele: HTMLElement | Window): number;
offset(ele: HTMLElement): import("./doms").Offset;
attr(ele: HTMLElement, property: string | {
[key: string]: string;
}, val?: string): string;
removeAttr(ele: HTMLElement, property: string): void;
addClass(ele: HTMLElement, classNames: string | string[]): void;
removeClass(ele: HTMLElement, classNames: string | string[]): void;
css(ele: HTMLElement, property: string | {}, val?: string | number): string;
removeStyle(ele: HTMLElement, propertys: string | string[]): void;
on(ele: HTMLElement | Window | Document, ev: string, cb: (e: any) => void): void;
off(ele: HTMLElement | Window | Document, ev: string, cb: (e: any) => void): void;
hasClass(ele: HTMLElement, className: string): boolean;
};
padZero(num: number, targetLen?: number): string;
easeIn(distance: number, cb: (retVal: number) => void): number;
hasProperty(obj: any, property: any): boolean;
isReactElement(ele: any): boolean;
isEqual(a: any, b: any): boolean;
isSameMoment(a: import("moment").Moment, b: import("moment").Moment, granularity?: import("moment").unitOfTime.StartOf): boolean;
isExist(a: any): boolean;
stopReactPropagation(e: import("react").SyntheticEvent<Element, Event>): void;
preClass(className: string): string;
otherProps(propTypes: import("react").WeakValidationMap<any>, props: import("react").Props<any>): import("react").Props<any>;
omitProps(props: import("react").Props<any>, omits: string[]): import("react").Props<any>;
};
export default utils;