@lidick/mt-react-view
Version:
A React component library
28 lines (27 loc) • 691 B
TypeScript
/**
* 滚动到页面顶部
*/
export declare const scrollToTop: () => void;
/**
* 滚动到指定坐标
*
* @param xCord 文档中的横轴坐标
* @param yCord 文档中的纵轴坐标
*/
export declare const scrollTo: (xCord: number, yCord: number) => void;
/**
* 滚动到页面底部
*/
export declare const scrollToBottom: () => void;
/**
* 滚动到元素
*
* @param element 元素选择器
* @param options
* {
* block: "center" | "end" | "nearest" | "start",
* inline: "center" | "end" | "nearest" | "start"
* behavior: "auto" | "instant" | "smooth"
* }
*/
export declare const scrollToDom: (element: string, options?: ScrollIntoViewOptions) => void;