scroll-load.js 565 B

123456789101112131415
  1. (function(global,factory){
  2. typeof define == 'function' && define(['better-scroll'],factory)
  3. })(this,function(BScroll){
  4. return {
  5. install:function(Vue){
  6. Vue.prototype.$scrollLoad = function(dom,loadFn){
  7. var scroll = new BScroll(dom,{click:true,probeType:1,cancelable:false,deceleration:0.005,snapThreshold:0.01});
  8. scroll.on('pullingUp',function(){
  9. loadFn && loadFn(scroll.finishPullUp,scroll.refresh);
  10. });
  11. return scroll;
  12. };
  13. }
  14. }
  15. });