chowa
Version:
UI component library based on React
33 lines (32 loc) • 1.25 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.
*/
export interface Offset {
width: number;
height: number;
top: number;
left: number;
}
declare const _default: {
rect(ele: HTMLElement): DOMRect | ClientRect;
pageOffset(): Offset;
scrollTop(ele: HTMLElement | Window): number;
offset(ele: HTMLElement): 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;
};
export default _default;