Code
new Vue({
el: '#module',
template: '<scrollbar :maxHeight="\'50vh\'"' +
' :isMobile="isMobile"' +
' @reachBottom="log(\'Reach bottom\')"' +
' @reachTop="log(\'Reach top\')"' +
' @startDrag="log(\'Drag start\')"' +
' @endDrag="log(\'Drag end\')">' +
' <div class="content" style="width:100vw;height:100vh;" @click="log">Scroll Content</div>' +
'</scrollbar>',
data: function () {
return {
isMobile: /Android|webOS|iPhone|iPod|iPad|BlackBerry|Windows Phone/i.test(navigator.userAgent)
}
},
methods: {
log: function (e) {
console.log(e || 1)
}
},
components: { 'scrollbar': VueScrollbar }
})