UNPKG

tdesign-vue-next

Version:
41 lines (40 loc) 2.16 kB
import { ComponentPublicInstance, VNode } from 'vue'; import { EasingFunction } from 'tdesign-vue-next/lib/common/js/utils/easing'; import { ScrollContainer, ScrollContainerElement } from '../common'; export declare const isServer: boolean; 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 | Element; export declare const getSSRAttach: () => string; export declare const getScrollContainer: (container?: ScrollContainer) => ScrollContainerElement; type ScrollTarget = HTMLElement | Window | Document; export declare function getScroll(target: ScrollTarget, isLeft?: boolean): number; interface ScrollTopOptions { container?: ScrollTarget; duration?: number; easing?: EasingFunction; } declare type ScrollToResult<T = any> = T | { default: T; }; export declare function scrollTo(target: number, opt: ScrollTopOptions): Promise<ScrollToResult>; export declare const clickOut: (els: VNode | Element | Iterable<any> | ArrayLike<any>, cb: () => void) => void; export declare const isTextEllipsis: (ele: ComponentPublicInstance | Element | ComponentPublicInstance[] | Element[]) => boolean; export declare const scrollSelectedIntoView: (parentEle: HTMLElement, selected: HTMLElement) => void; export declare const requestSubmit: (target: HTMLFormElement) => void; 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 {};