1 |
- !function(){function t(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,n){var e=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==e)return;var r,i,o=[],a=!0,l=!1;try{for(e=e.call(t);!(a=(r=e.next()).done)&&(o.push(r.value),!n||o.length!==n);a=!0);}catch(u){l=!0,i=u}finally{try{a||null==e.return||e.return()}finally{if(l)throw i}}return o}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return n(t,e);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 n(t,e)}(t,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(t,n){(null==n||n>t.length)&&(n=t.length);for(var e=0,r=new Array(n);e<n;e++)r[e]=t[e];return r}var e=document.createElement("style");e.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(e),System.register(["./index-legacy.f8641610.js","./use-tab-status-legacy.5d29085f.js"],(function(n){"use strict";var e,r,i,o,a,l,u,s,c,d,f,v,h,g,m,p,x,y,b;return{setters:[function(t){e=t.E,r=t.ab,i=t.a0,o=t.H,a=t.d,l=t.U,u=t.ac,s=t.a3,c=t.aU,d=t.V,f=t.ak,v=t.af,h=t.i,g=t.X,m=t.Y,p=t.ag,x=t.aS,y=t.O},function(t){b=t.u}],execute:function(){var _=t(e("list"),3),S=_[0],T=_[1],w=_[2],z={error:Boolean,offset:r(300),loading:Boolean,finished:Boolean,errorText:String,direction:i("down"),loadingText:String,finishedText:String,immediateCheck:o},A=a({name:S,props:z,emits:["load","update:error","update:loading"],setup:function(t,n){var e=n.emit,r=n.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 n=t.offset,r=t.direction,l=m(_);if(l.height&&!p(o)){var u=m(a);("up"===r?l.top-u.top<=n:u.bottom-l.bottom<=n)&&(i.value=!0,e("update:loading",!0),e("load"))}}}))},z=function(){if(t.finished){var n=r.finished?r.finished():t.finishedText;if(n)return h("div",{class:T("finished-text")},[n])}},A=function(){e("update:error",!1),S()},j=function(){if(t.error){var n=r.error?r.error():t.errorText;if(n)return h("div",{role:"button",class:T("error-text"),tabindex:0,onClick:A},[n])}},k=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||w("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 n,e=null==(n=r.default)?void 0:n.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?e:l,k(),z(),j(),"up"===t.direction?e:l])}}});n("L",y(A))}}}))}();
|