index-legacy.7585c89d.js 3.5 KB

1
  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.bcc45929.js","./index-legacy.9b0f7f75.js","./use-tab-status-legacy.c3bd8ea3.js"],(function(n){"use strict";var e,r,i,o,a,l,u,c,s,d,f,v,h,g,m,p,x,y,b;return{setters:[function(t){e=t.d,r=t.r,i=t.N,o=t.w,a=t.a3,l=t.G,u=t.F,c=t.c,s=t.E,d=t.b},function(t){f=t.c,v=t.b,h=t.m,g=t.t,m=t.f,p=t.i,x=t.L,y=t.w},function(t){b=t.u}],execute:function(){var _=t(f("list"),3),w=_[0],S=_[1],T=_[2],z={error:Boolean,offset:v(300),loading:Boolean,finished:Boolean,errorText:String,direction:h("down"),loadingText:String,finishedText:String,immediateCheck:g},j=e({name:w,props:z,emits:["load","update:error","update:loading"],setup:function(t,n){var e=n.emit,f=n.slots,v=r(!1),h=r(),g=r(),y=b(),_=i(h),w=function(){s((function(){if(!(v.value||t.finished||t.error||!1===(null==y?void 0:y.value))){var n=t.offset,r=t.direction,i=d(_);if(i.height&&!p(h)){var o=d(g);("up"===r?i.top-o.top<=n:o.bottom-i.bottom<=n)&&(v.value=!0,e("update:loading",!0),e("load"))}}}))},z=function(){if(t.finished){var n=f.finished?f.finished():t.finishedText;if(n)return c("div",{class:S("finished-text")},[n])}},j=function(){e("update:error",!1),w()},A=function(){if(t.error){var n=f.error?f.error():t.errorText;if(n)return c("div",{role:"button",class:S("error-text"),tabindex:0,onClick:j},[n])}},C=function(){if(v.value&&!t.finished)return c("div",{class:S("loading")},[f.loading?f.loading():c(x,{class:S("loading-icon")},{default:function(){return[t.loadingText||T("loading")]}})])};return o((function(){return[t.loading,t.finished,t.error]}),w),y&&o(y,(function(t){t&&w()})),a((function(){v.value=t.loading})),l((function(){t.immediateCheck&&w()})),m({check:w}),u("scroll",w,{target:_}),function(){var n,e=null==(n=f.default)?void 0:n.call(f),r=c("div",{ref:g,class:S("placeholder")},null);return c("div",{ref:h,role:"feed",class:S(),"aria-busy":v.value},["down"===t.direction?e:r,C(),z(),A(),"up"===t.direction?e:r])}}});n("L",y(j))}}}))}();