0.5.2 • Published 4 years ago

vue-scroll-hook v0.5.2

Weekly downloads
3
License
MIT
Repository
github
Last release
4 years ago

Vue Scroll Hook

Vue 2.x Vue 3.x npm

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
  }
}