1 |
- (window.webpackJsonp=window.webpackJsonp||[]).push([[67],{539:function(t,e,i){},702:function(t,e,i){"use strict";i(539)},727:function(t,e,i){"use strict";i.r(e);var s=i(436),n=i(435),o=function(){function t(t){this.scroll=t,this.refreshTimer=0,this.init()}return t.prototype.init=function(){this.handleOptions(this.scroll.options.observeImage),this.bindEventsToWrapper()},t.prototype.handleOptions=function(t){void 0===t&&(t={}),t=!0===t?{}:t;this.options=Object(n.t)({debounceTime:100},t)},t.prototype.bindEventsToWrapper=function(){var t=this.scroll.scroller.wrapper;this.imageLoadEventRegister=new n.f(t,[{name:"load",handler:this.load.bind(this),capture:!0}]),this.imageErrorEventRegister=new n.f(t,[{name:"error",handler:this.load.bind(this),capture:!0}])},t.prototype.load=function(t){var e=this,i=t.target,s=this.options.debounceTime;i&&"img"===i.tagName.toLowerCase()&&(0===s?this.scroll.refresh():(clearTimeout(this.refreshTimer),this.refreshTimer=window.setTimeout((function(){e.scroll.refresh()}),this.options.debounceTime)))},t.pluginName="observeImage",t}();s.a.use(o);var r={data:function(){return{images:["https://dpubstatic.udache.com/static/dpubimg/dEswI1MVy6/zoo.png","https://dpubstatic.udache.com/static/dpubimg/BYb_wPak21/home.png","https://dpubstatic.udache.com/static/dpubimg/B6q1pWB0sB/cabin.png","https://dpubstatic.udache.com/static/dpubimg/76n1ilzf4R/stone.png"]}},mounted:function(){this.init()},beforeDestroy:function(){this.bs.destroy()},methods:{init:function(){this.bs=new s.a(this.$refs.scroll,{observeImage:!0})}}},a=(i(702),i(41)),c=Object(a.a)(r,(function(){var t=this._self._c;return t("div",{staticClass:"observe-image-container"},[t("div",{ref:"scroll",staticClass:"scroll-wrapper"},[t("div",{staticClass:"scroll-content"},this._l(this.images,(function(e,i){return t("img",{key:i,attrs:{width:"100%",src:e,alt:""}})})),0)])])}),[],!1,null,"ef2a0076",null);e.default=c.exports}}]);
|