onScrollerMouse(e: WheelEvent) {
const scrollerEl: Element = (this.$refs as any).scroller.$el as Element
if (scrollerEl) {
if (e.deltaY < 0) {
if (scrollerEl.scrollTop === 0) {
// reached top
}
} else if (e.deltaY > 0) {
if (scrollerEl.scrollTop + scrollerEl.getBoundingClientRect().height >= scrollerEl.scrollHeight - 300) {
// reached bottom within 300px
}
}
}
}
You can do something like this: