scroll directive for vuejs 2.0
npm install vue-scroll
npm install vue-scroll --save
`
$3
Standalone bundle is not support on latest v2.1.0 currently
Simple download from releases and include it in script tag.
Get started
`javascript
import Vue from 'vue'
import vuescroll from 'vue-scroll'
Vue.use(vuescroll)
`
Directive v-scroll then can be used in any of your Component.
`App.vue
...
`
Method onScroll receives two arguments once scroll event is fired,
* e - event
* position - Object contains scrolling data
- scrollTop Number
- scrollLeft Number
Advanced
throttle and debounce are supported since v2.1.0, you can enable it as global configurations like:
`javascript
Vue.use(vuescroll, {throttle: 600})
//Or
Vue.use(vuescroll, {debounce: 600})
`
Override global configurations like
`html
`
`html
``