tdesign-vue
Version:
38 lines (37 loc) • 1.91 kB
TypeScript
import Vue from 'vue';
import { EasingFunction } from './easing';
import { ScrollContainer, ScrollContainerElement } from '../common';
export declare const isServer: any;
export declare const trim: (str: string) => string;
export declare const on: any;
export declare const off: any;
export declare function once(element: Node, event: string, handler: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
export declare function hasClass(el: Element, cls: string): any;
export declare function addClass(el: Element, cls: string): any;
export declare function removeClass(el: Element, cls: string): any;
export declare const getAttach: (node: any, triggerNode?: any) => HTMLElement;
export declare const getScrollContainer: (container?: ScrollContainer) => ScrollContainerElement;
declare type ScrollTarget = HTMLElement | Window | Document;
export declare function getScroll(target: ScrollTarget, isLeft?: boolean): number;
interface ScrollTopOptions {
container?: ScrollTarget;
duration?: number;
easing?: EasingFunction;
}
export declare function scrollTo(target: number, opt: ScrollTopOptions): Promise<unknown>;
export declare const clickOut: (els: Vue | Element | Iterable<any> | ArrayLike<any>, cb: Function) => void;
export declare const isNodeOverflow: (ele: Vue | Element | (Vue | Element)[]) => boolean;
export declare const removeDom: (el: HTMLElement) => void;
export declare function getScrollbarWidth(): number;
export declare function elementInViewport(elm: HTMLElement, parent?: HTMLElement): boolean;
export declare function getElmCssPropValue(element: HTMLElement, propName: string): string;
export declare function isFixed(element: HTMLElement): boolean;
export declare function getWindowScroll(): {
scrollTop: number;
scrollLeft: number;
};
export declare function getWindowSize(): {
width: number;
height: number;
};
export {};