!function(o){var e=window.Vue;if(!e)throw new Error("Please load vue.js before install current plugin");var n={};n.install=function(o,e){o.directive("scroll",{bind:function(){console.log("prepare for bind vue-scroll on specify dom")},update:function(o,e){var n=this.el;if(!o||"function"!=typeof o)throw new Error("onScroll listener is not a valid function");n==document.body?document.onscroll=function(e){o&&o(e,{scrollTop:document.body.scrollTop,scrollLeft:document.body.scrollLeft})}:n.addEventListener?(n.removeEventListener("scroll",e),n.addEventListener("scroll",function(e){o&&o(e,{scrollTop:n.scrollTop,scrollLeft:n.scrollLeft})})):(n.detachEvent("onscroll",e),n.attach("onscroll",function(){var e=window.event;o&&o(e,{scrollTop:n.scrollTop,scrollLeft:n.scrollLeft})}))},unbind:function(){var o=this,e=this.el,n=this.vm,l=n[o.expression];e==document.body?document.onscroll=null:e.removeEventListener?e.removeEventListener("scroll",l):e.detachEvent("onscroll",l)}})},e.use(n)}(void 0);
!function(){var e,o=!0;e="undefined"==typeof require?Window.Vue:require("vue"),e||(o=!1,console.warn("Vue is not loaded yet. Please make sure it is loaded before installing vue-scroll."));var l={install:function(e,o){var l=function(e,o,l){e==document.body?document.onscroll=function(e){o&&o(e,{scrollTop:document.body.scrollTop,scrollLeft:document.body.scrollLeft})}:e.addEventListener?(l&&e.removeEventListener("scroll",l),e.addEventListener("scroll",function(l){o&&o(l,{scrollTop:e.scrollTop,scrollLeft:e.scrollLeft})})):(l&&e.detachEvent("onscroll",l),e.attach("onscroll",function(l){l=l||window.event,o&&o(l,{scrollTop:e.scrollTop,scrollLeft:e.scrollLeft})}))};e.directive("scroll",{bind:function(e,o,n){if(!o.value||"function"!=typeof o.value)throw new Error("The scroll listener is not a function");l(e,o.value,o.oldValue)},inserted:function(e,o){},update:function(e,o){if(o.value!==o.oldValue){if(!o.value||"function"!=typeof o.value)throw new Error("The scroll listener is not a function");l(e,o.value,o.oldValue)}},unbind:function(e,o){o.value&&"function"==typeof bind.value&&(e.removeEventListener?e.removeEventListener("scroll",o.value):e.detachEvent("onscroll",o.value))}})}};"undefined"!=typeof module&&"undefined"!=typeof module.exports?module.exports=l:window.vScroll=l}();
Add compressed code for production use
Add compressed code for production use
