Vue Scroll Hook
A Vue plugin that makes a hook named onScroll
that can be registered an event on window scrolling.
Installation
npm install --save vue-scroll-hook
import { createApp } from 'vue'
import VueScrollHook from 'vue-scroll-hook'
const app = createApp(...)
app.use(VueScrollHook)
Usage
export default {
data () {
return {
}
},
created () {
},
onScroll (e) {
console.log(e)
// Do something you want to on window scrolling
}
}