index-legacy.a7012d0a.js 3.5 KB

1
  1. !function(){function t(t,n){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==n)return;var r,i,o=[],a=!0,l=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(o.push(r.value),!e||o.length!==e);a=!0);}catch(u){l=!0,i=u}finally{try{a||null==n.return||n.return()}finally{if(l)throw i}}return o}(t,n)||function(t,n){if(!t)return;if("string"==typeof t)return e(t,n);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return e(t,n)}(t,n)||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 e(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var n=document.createElement("style");n.innerHTML=":root{--van-list-text-color: var(--van-text-color-2);--van-list-text-font-size: var(--van-font-size-md);--van-list-text-line-height: 1.33333rem;--van-list-loading-icon-size: .42667rem}.van-list__loading,.van-list__finished-text,.van-list__error-text{color:var(--van-list-text-color);font-size:var(--van-list-text-font-size);line-height:var(--van-list-text-line-height);text-align:center}.van-list__placeholder{height:0;pointer-events:none}.van-list__loading-icon .van-loading__spinner{width:var(--van-list-loading-icon-size);height:var(--van-list-loading-icon-size)}\n",document.head.appendChild(n),System.register(["./index-legacy.fba2875c.js","./use-tab-status-legacy.8752ccde.js"],(function(e){"use strict";var n,r,i,o,a,l,u,s,c,d,f,v,h,g,m,p,x,y,b;return{setters:[function(t){n=t.A,r=t.aa,i=t.$,o=t.G,a=t.d,l=t.S,u=t.ab,s=t.a2,c=t.aT,d=t.U,f=t.aj,v=t.ae,h=t.j,g=t.W,m=t.X,p=t.af,x=t.aS,y=t.N},function(t){b=t.u}],execute:function(){var _=t(n("list"),3),S=_[0],T=_[1],j=_[2],w={error:Boolean,offset:r(300),loading:Boolean,finished:Boolean,errorText:String,direction:i("down"),loadingText:String,finishedText:String,immediateCheck:o},z=a({name:S,props:w,emits:["load","update:error","update:loading"],setup:function(t,e){var n=e.emit,r=e.slots,i=l(!1),o=l(),a=l(),y=b(),_=u(o),S=function(){g((function(){if(!(i.value||t.finished||t.error||!1===(null==y?void 0:y.value))){var e=t.offset,r=t.direction,l=m(_);if(l.height&&!p(o)){var u=m(a);("up"===r?l.top-u.top<=e:u.bottom-l.bottom<=e)&&(i.value=!0,n("update:loading",!0),n("load"))}}}))},w=function(){if(t.finished){var e=r.finished?r.finished():t.finishedText;if(e)return h("div",{class:T("finished-text")},[e])}},z=function(){n("update:error",!1),S()},A=function(){if(t.error){var e=r.error?r.error():t.errorText;if(e)return h("div",{role:"button",class:T("error-text"),tabindex:0,onClick:z},[e])}},C=function(){if(i.value&&!t.finished)return h("div",{class:T("loading")},[r.loading?r.loading():h(x,{class:T("loading-icon")},{default:function(){return[t.loadingText||j("loading")]}})])};return s((function(){return[t.loading,t.finished,t.error]}),S),y&&s(y,(function(t){t&&S()})),c((function(){i.value=t.loading})),d((function(){t.immediateCheck&&S()})),f({check:S}),v("scroll",S,{target:_}),function(){var e,n=null==(e=r.default)?void 0:e.call(r),l=h("div",{ref:a,class:T("placeholder")},null);return h("div",{ref:o,role:"feed",class:T(),"aria-busy":i.value},["down"===t.direction?n:l,C(),w(),A(),"up"===t.direction?n:l])}}});e("L",y(z))}}}))}();