UNPKG

@extclp/vexip-ui

Version:

A Vue 3 UI library, Highly customizability, full TypeScript, performance pretty good

23 lines (22 loc) 451 B
function u(c, i, n, s, o) { const t = n - i, f = Math.ceil(t / s * 16), r = () => { typeof o == "function" && o(); }; if (!t) { r(); return; } if (s <= 0) { c.scrollTo(0, n), r(); return; } let e = i; const l = () => { t && (e = e + f, (n - e) / t <= 0 && (e = n), c.scrollTo(0, e), e === n ? r() : requestAnimationFrame(l)); }; l(); } export { u as animateScrollTo }; //# sourceMappingURL=helper.mjs.map