You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
10 lines
3.2 KiB
10 lines
3.2 KiB
(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["components/easy-loadimage/easy-loadimage"],{"1e48":function(t,e,n){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=n("b135");function r(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(t){var e=16*Math.random()|0,n="x"==t?e:3&e|8;return n.toString(16)}))}var i={props:{imageSrc:{type:String,default:""},borderSrc:{type:String,default:""},mode:{type:String,default:""},loadingMode:{type:String,default:"looming-gray"},openTransition:{type:Boolean,default:!0},viewHeight:{type:Number,default:function(){return t.getSystemInfoSync().windowHeight}},width:{type:String,default:""},height:{type:String,default:""},borderRadius:{type:String,default:""}},data:function(){var e=this;return{uid:"uid-"+r(),loadImg:!1,showImg:!1,isLoadError:!1,borderLoaded:0,showTransition:!1,scrollFn:(0,o.throttle)((function(){if(!e.loadImg&&!e.isLoadError){var n=e.uid,o=t.createSelectorQuery().in(e);o.select("#"+n).boundingClientRect((function(t){t&&t.top-e.viewHeight<0&&(e.loadImg=!!e.imageSrc,e.isLoadError=!e.loadImg)})).exec()}}),200)}},computed:{boxStyle:function(){return{width:this.width,height:this.height,borderRadius:this.borderRadius}},imgStyle:function(){return{borderRadius:this.borderRadius}}},methods:{init:function(){this.$nextTick(this.onScroll)},handleBorderLoad:function(){this.borderLoaded=1},handleBorderError:function(){this.borderLoaded=2},handleImgLoad:function(t){var e=this;this.showImg=!0,setTimeout((function(){e.showTransition=!0}),50)},handleImgError:function(t){this.isLoadError=!0},onScroll:function(){this.scrollFn()}},mounted:function(){this.init(),t.$on("scroll",this.scrollFn),this.onScroll()},beforeDestroy:function(){t.$off("scroll",this.scrollFn)}};e.default=i}).call(this,n("df3c")["default"])},"450f":function(t,e,n){"use strict";var o=n("84ca"),r=n.n(o);r.a},"84ca":function(t,e,n){},a9c6:function(t,e,n){"use strict";n.r(e);var o=n("d309"),r=n("cb43");for(var i in r)["default"].indexOf(i)<0&&function(t){n.d(e,t,(function(){return r[t]}))}(i);n("450f");var a=n("828b"),d=Object(a["a"])(r["default"],o["b"],o["c"],!1,null,"33deecd8",null,!1,o["a"],void 0);e["default"]=d.exports},cb43:function(t,e,n){"use strict";n.r(e);var o=n("1e48"),r=n.n(o);for(var i in o)["default"].indexOf(i)<0&&function(t){n.d(e,t,(function(){return o[t]}))}(i);e["default"]=r.a},d309:function(t,e,n){"use strict";n.d(e,"b",(function(){return o})),n.d(e,"c",(function(){return r})),n.d(e,"a",(function(){}));var o=function(){var t=this,e=t.$createElement,n=(t._self._c,t.__get_style([t.boxStyle])),o=t.loadImg&&!t.isLoadError?t.__get_style([t.imgStyle]):null,r=t.loadImg&&!t.isLoadError&&t.borderSrc?t.__get_style([t.imgStyle]):null;t.$mp.data=Object.assign({},{$root:{s0:n,s1:o,s2:r}})},r=[]}}]);
|
|
;(global["webpackJsonp"] = global["webpackJsonp"] || []).push([
|
|
'components/easy-loadimage/easy-loadimage-create-component',
|
|
{
|
|
'components/easy-loadimage/easy-loadimage-create-component':(function(module, exports, __webpack_require__){
|
|
__webpack_require__('df3c')['createComponent'](__webpack_require__("a9c6"))
|
|
})
|
|
},
|
|
[['components/easy-loadimage/easy-loadimage-create-component']]
|
|
]);
|
|
|