Closed nitrowo closed 4 years ago
@nitrowo you can listen to all perfect-scrollbar events in vuejs way.
<template>
<div id="app">
<perfect-scrollbar @ps-scroll-y="onScroll" ref="scrollbar">
<div>your content here</div>
</perfect-scrollbar>
</div>
</template>
<script>
export default {
methods: {
onScroll(event) {
console.log(this.$refs.scrollbar.ps, event);
}
}
};
</script>
more events you can find in perfect scrollbar docs -> https://github.com/mdbootstrap/perfect-scrollbar#events
I added an example to documentation to make it more clear for everyone.
hi,
you can integrate this.$emit for events, it's boring to window.addEventListener :)
ty