1 |
- !function(){function r(r,e){return function(r){if(Array.isArray(r))return r}(r)||function(r,n){var e=null==r?null:"undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(null==e)return;var t,o,a=[],i=!0,l=!1;try{for(e=e.call(r);!(i=(t=e.next()).done)&&(a.push(t.value),!n||a.length!==n);i=!0);}catch(u){l=!0,o=u}finally{try{i||null==e.return||e.return()}finally{if(l)throw o}}return a}(r,e)||function(r,e){if(!r)return;if("string"==typeof r)return n(r,e);var t=Object.prototype.toString.call(r).slice(8,-1);"Object"===t&&r.constructor&&(t=r.constructor.name);if("Map"===t||"Set"===t)return Array.from(r);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return n(r,e)}(r,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function n(r,n){(null==n||n>r.length)&&(n=r.length);for(var e=0,t=new Array(n);e<n;e++)t[e]=r[e];return t}System.register(["./App-legacy.a7c1546c.js"],(function(n){"use strict";var e,t,o,a,i,l,u,c,s,f,d,g,v,h,y,m,p;return{setters:[function(r){e=r.d,t=r.a6,o=r.r,a=r.a7,i=r.X,l=r.w,u=r.a8,c=r.a9,s=r.a,f=r.aa,d=r.ab,g=r.ac,v=r.ad,h=r.ae,y=r.W,m=r.af,p=r.ag}],execute:function(){var S=r(f("image"),2),b=S[0],w=S[1],z=e({name:b,props:{src:String,alt:String,fit:String,round:Boolean,width:[Number,String],height:[Number,String],radius:[Number,String],lazyLoad:Boolean,iconSize:[Number,String],showError:t,iconPrefix:String,showLoading:t,errorIcon:{type:String,default:"photo-fail"},loadingIcon:{type:String,default:"photo"}},emits:["load","error"],setup:function(r,n){var e=n.emit,t=n.slots,f=o(!1),p=o(!0),S=o(),b=a().proxy.$Lazyload,z=i((function(){var n={};return d(r.width)&&(n.width=g(r.width)),d(r.height)&&(n.height=g(r.height)),d(r.radius)&&(n.overflow="hidden",n.borderRadius=g(r.radius)),n}));l((function(){return r.src}),(function(){f.value=!1,p.value=!0}));var x=function(r){p.value=!1,e("load",r)},I=function(r){f.value=!0,p.value=!1,e("error",r)},A=function(){if(!f.value&&r.src){var n={alt:r.alt,class:w("img"),style:{objectFit:r.fit}};return r.lazyLoad?v(s("img",y({ref:S},n),null),[[h("lazy"),r.src]]):s("img",y({src:r.src,onLoad:x,onError:I},n),null)}},L=function(r){r.el===S.value&&p.value&&x()},$=function(r){r.el!==S.value||f.value||I()};return b&&u&&(b.$on("loaded",L),b.$on("error",$),c((function(){b.$off("loaded",L),b.$off("error",$)}))),function(){return s("div",{class:w({round:r.round}),style:z.value},[A(),p.value&&r.showLoading?s("div",{class:w("loading")},[t.loading?t.loading():s(m,{size:r.iconSize,name:r.loadingIcon,class:w("loading-icon"),classPrefix:r.iconPrefix},null)]):f.value&&r.showError?s("div",{class:w("error")},[t.error?t.error():s(m,{size:r.iconSize,name:r.errorIcon,class:w("error-icon"),classPrefix:r.iconPrefix},null)]):void 0,null==t.default?void 0:t.default()])}}});n("I",p(z))}}}))}();
|