|
|
|
|
+(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["components/u-parse/components/wxParseImg"],{"099c":function(t,e,n){"use strict";n.r(e);var r=n("11d3"),a=n.n(r);for(var i in r)"default"!==i&&function(t){n.d(e,t,(function(){return r[t]}))}(i);e["default"]=a.a},"11d3":function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r={name:"wxParseImg",data:function(){return{newStyleStr:"",preview:!0}},props:{node:{type:Object,default:function(){return{}}}},methods:{wxParseImgTap:function(t){if(this.preview){var e=t.currentTarget.dataset.src;if(e){var n=this.$parent;while(!n.preview||"function"!==typeof n.preview)n=n.$parent;n.preview(e,t)}}},wxParseImgLoad:function(t){var e=t.currentTarget.dataset.src;if(e){var n=t.mp.detail,r=n.width,a=n.height,i=this.wxAutoImageCal(r,a),c=i.imageheight,o=i.imageWidth,u=this.node.attr,d=u.padding,s=u.mode,f=this.node.styleStr,p="widthFix"===s?"":"height: ".concat(c,"px;");this.newStyleStr="".concat(f,"; ").concat(p,"; width: ").concat(o,"px; padding: 0 ").concat(+d,"px;")}},wxAutoImageCal:function(t,e){var n=this.node.attr.padding,r=this.node.$screen.width-2*n,a={};if(t<60||e<60){var i=this.node.attr.src,c=this.$parent;while(!c.preview||"function"!==typeof c.preview)c=c.$parent;c.removeImageUrl(i),this.preview=!1}return t>r?(a.imageWidth=r,a.imageheight=r*(e/t)):(a.imageWidth=t,a.imageheight=e),a}}};e.default=r},"38e8c":function(t,e,n){"use strict";var r;n.d(e,"b",(function(){return a})),n.d(e,"c",(function(){return i})),n.d(e,"a",(function(){return r}));var a=function(){var t=this,e=t.$createElement;t._self._c},i=[]},e3f6:function(t,e,n){"use strict";n.r(e);var r=n("38e8c"),a=n("099c");for(var i in a)"default"!==i&&function(t){n.d(e,t,(function(){return a[t]}))}(i);var c,o=n("f0c5"),u=Object(o["a"])(a["default"],r["b"],r["c"],!1,null,null,null,!1,r["a"],c);e["default"]=u.exports}}]);
|