naive-ui
Version:
A Vue 3 Component Library. Fairly Complete, Theme Customizable, Uses TypeScript, Fast
13 lines (12 loc) • 414 B
JavaScript
Object.defineProperty(exports, "__esModule", { value: true });
exports.getScrollTop = getScrollTop;
exports.getRect = getRect;
function getScrollTop(target) {
return target instanceof HTMLElement ? target.scrollTop : window.scrollY;
}
function getRect(target) {
return target instanceof HTMLElement
? target.getBoundingClientRect()
: { top: 0, bottom: window.innerHeight };
}
;