vue-scroll-hook

0.5.2 • Public • Published

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

Readme

Keywords

none

Package Sidebar

Install

npm i vue-scroll-hook

Weekly Downloads

3

Version

0.5.2

License

MIT

Unpacked Size

2.95 kB

Total Files

4

Last publish

Collaborators

  • laineus