vue-scroll-detector
v2.0.5
Published
Scroll detector is component to emit event when the component enter client rectangle.
Downloads
13
Readme
Scroll Detector
Scroll detector is component to emit event when the component enter client rectangle.
Demo
Usage
npm install --save vue-scroll-detector
<scroll-detector @enter-client-rect="onEnter">
<!-- Your content -->
</scroll-detector>
import ScrollDetector from "vue-scroll-detector";
export default {
components: {
ScrollDetector,
},
methods: {
onEnter() {
console.log('detect enter client rect');
}
}
}
Events
- into-client-rect
- out-client-rect
- enter-client-rect
- leave-client-rect
- near-client-rect
- far-client-rect
Properties
- check-when-mounted
- delay-check-when-mounted
- near-range
Development
Debug
npm run serve
Release
npm run build
npm publish