@lancercomet/utils
Version:
My personal utils lib.
22 lines (21 loc) • 589 B
TypeScript
/**
* 获取页面滚动高度.
*
* @return {number}
*/
declare function getScrollTop(): number;
/**
* 以动画效果滚动 Y 轴.
*
* @param {[number = 0]} y 滚动至目标位置,默认为 0.
*/
declare function scrollYWithAnimation(y?: number): void;
/**
* 检查是否滚动到了顶部.
*/
declare function checkIsReachTop(element: HTMLElement): boolean;
/**
* 检查是否滚动到了底部.
*/
declare function checkIsReachBottom(element: HTMLElement): boolean;
export { getScrollTop, scrollYWithAnimation, checkIsReachTop, checkIsReachBottom };