Unto the Tab full scroll

This commit is contained in:
Peter Olu 2022-04-28 04:48:26 +01:00
parent 6b6cee2451
commit f5ee0fffb7

View File

@ -108,9 +108,9 @@ export default defineComponent({
currentItem.value++; currentItem.value++;
scrollTo(currentItem.value); scrollTo(currentItem.value);
} else if (currentItem.value === arrayOfItems?.value?.length - 1) { } else if (currentItem.value === arrayOfItems?.value?.length - 1) {
isScrolling.value = false; isScrolling.value = true;
currentItem.value = 0; currentItem.value = 0;
scrollWrapRef.value?.scrollTo(0,0) scrollTo(currentItem.value);
} }
} }
function initScroller() { function initScroller() {
@ -119,10 +119,8 @@ export default defineComponent({
isScrolling.value = true; isScrolling.value = true;
if (e.deltaY < 0) { if (e.deltaY < 0) {
scrollUp(); scrollUp();
// scrollUp
} else { } else {
scrollDown(); scrollDown();
// scrollDown
} }
} }
}); });