1 |
- !function(){function e(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,i,o=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);a=!0);}catch(u){l=!0,i=u}finally{try{a||null==n.return||n.return()}finally{if(l)throw i}}return o}(e,n)||function(e,n){if(!e)return;if("string"==typeof e)return t(e,n);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return t(e,n)}(e,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 t(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[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(["./ResizeObserver.es-legacy.8d60aee1.js","./use-tab-status-legacy.1f35f332.js"],(function(t){"use strict";var n,r,i,o,a,l,u,s,c,d,f,v,h,g,m,p,y,x,b;return{setters:[function(e){n=e.E,r=e.ab,i=e.a0,o=e.H,a=e.d,l=e.U,u=e.ac,s=e.a3,c=e.aW,d=e.V,f=e.ak,v=e.af,h=e.j,g=e.X,m=e.Y,p=e.ag,y=e.aT,x=e.O},function(e){b=e.u}],execute:function(){var _=e(n("list"),3),S=_[0],T=_[1],z=_[2],w={error:Boolean,offset:r(300),loading:Boolean,finished:Boolean,errorText:String,direction:i("down"),loadingText:String,finishedText:String,immediateCheck:o},j=a({name:S,props:w,emits:["load","update:error","update:loading"],setup:function(e,t){var n=t.emit,r=t.slots,i=l(!1),o=l(),a=l(),x=b(),_=u(o),S=function(){g((function(){if(!(i.value||e.finished||e.error||!1===(null==x?void 0:x.value))){var t=e.offset,r=e.direction,l=m(_);if(l.height&&!p(o)){var u=m(a);("up"===r?l.top-u.top<=t:u.bottom-l.bottom<=t)&&(i.value=!0,n("update:loading",!0),n("load"))}}}))},w=function(){if(e.finished){var t=r.finished?r.finished():e.finishedText;if(t)return h("div",{class:T("finished-text")},[t])}},j=function(){n("update:error",!1),S()},A=function(){if(e.error){var t=r.error?r.error():e.errorText;if(t)return h("div",{role:"button",class:T("error-text"),tabindex:0,onClick:j},[t])}},k=function(){if(i.value&&!e.finished)return h("div",{class:T("loading")},[r.loading?r.loading():h(y,{class:T("loading-icon")},{default:function(){return[e.loadingText||z("loading")]}})])};return s((function(){return[e.loading,e.finished,e.error]}),S),x&&s(x,(function(e){e&&S()})),c((function(){i.value=e.loading})),d((function(){e.immediateCheck&&S()})),f({check:S}),v("scroll",S,{target:_}),function(){var t,n=null==(t=r.default)?void 0:t.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"===e.direction?n:l,k(),w(),A(),"up"===e.direction?n:l])}}});t("L",x(j))}}}))}();
|