index.d5ee0b18.js 3.5 KB

12345
  1. <<<<<<<< HEAD:dist/assets/index.cafcb8b5.js
  2. import{t as L,w,u as C,v as E,d as R,R as h,an as B,Z as x,as as N,$ as _,W as y,a0 as D,c as r,_ as F,am as b,at as H,L as I,D as M}from"./index.ffe80dbe.js";import{u as U}from"./use-tab-status.5a3cd090.js";const[V,o,W]=L("list"),Z={error:Boolean,offset:w(300),loading:Boolean,disabled:Boolean,finished:Boolean,errorText:String,direction:C("down"),loadingText:String,finishedText:String,immediateCheck:E};var $=R({name:V,props:Z,emits:["load","update:error","update:loading"],setup(e,{emit:c,slots:a}){const d=h(e.loading),u=h(),g=h(),l=U(),v=B(u),n=()=>{F(()=>{if(d.value||e.finished||e.disabled||e.error||(l==null?void 0:l.value)===!1)return;const{offset:t,direction:s}=e,i=b(v);if(!i.height||H(u))return;let f=!1;const m=b(g);s==="up"?f=i.top-m.top<=t:f=m.bottom-i.bottom<=t,f&&(d.value=!0,c("update:loading",!0),c("load"))})},T=()=>{if(e.finished){const t=a.finished?a.finished():e.finishedText;if(t)return r("div",{class:o("finished-text")},[t])}},k=()=>{c("update:error",!1),n()},P=()=>{if(e.error){const t=a.error?a.error():e.errorText;if(t)return r("div",{role:"button",class:o("error-text"),tabindex:0,onClick:k},[t])}},S=()=>{if(d.value&&!e.finished&&!e.disabled)return r("div",{class:o("loading")},[a.loading?a.loading():r(I,{class:o("loading-icon")},{default:()=>[e.loadingText||W("loading")]})])};return x(()=>[e.loading,e.finished,e.error],n),l&&x(l,t=>{t&&n()}),N(()=>{d.value=e.loading}),_(()=>{e.immediateCheck&&n()}),y({check:n}),D("scroll",n,{target:v,passive:!0}),()=>{var t;const s=(t=a.default)==null?void 0:t.call(a),i=r("div",{ref:g,class:o("placeholder")},null);return r("div",{ref:u,role:"feed",class:o(),"aria-busy":d.value},[e.direction==="down"?s:i,S(),T(),P(),e.direction==="up"?s:i])}}});const z=M($);export{z as L};
  3. ========
  4. import{t as L,w,u as C,v as E,d as R,R as h,ap as B,Z as m,az as N,$ as _,W as y,a0 as z,c as r,_ as A,an as b,aA as D,L as F,D as H}from"./index.1c621181.js";import{u as I}from"./use-tab-status.40058c51.js";const[M,o,U]=L("list"),V={error:Boolean,offset:w(300),loading:Boolean,disabled:Boolean,finished:Boolean,errorText:String,direction:C("down"),loadingText:String,finishedText:String,immediateCheck:E};var W=R({name:M,props:V,emits:["load","update:error","update:loading"],setup(e,{emit:c,slots:a}){const d=h(e.loading),u=h(),g=h(),l=I(),v=B(u),n=()=>{A(()=>{if(d.value||e.finished||e.disabled||e.error||(l==null?void 0:l.value)===!1)return;const{offset:t,direction:s}=e,i=b(v);if(!i.height||D(u))return;let f=!1;const x=b(g);s==="up"?f=i.top-x.top<=t:f=x.bottom-i.bottom<=t,f&&(d.value=!0,c("update:loading",!0),c("load"))})},T=()=>{if(e.finished){const t=a.finished?a.finished():e.finishedText;if(t)return r("div",{class:o("finished-text")},[t])}},k=()=>{c("update:error",!1),n()},P=()=>{if(e.error){const t=a.error?a.error():e.errorText;if(t)return r("div",{role:"button",class:o("error-text"),tabindex:0,onClick:k},[t])}},S=()=>{if(d.value&&!e.finished&&!e.disabled)return r("div",{class:o("loading")},[a.loading?a.loading():r(F,{class:o("loading-icon")},{default:()=>[e.loadingText||U("loading")]})])};return m(()=>[e.loading,e.finished,e.error],n),l&&m(l,t=>{t&&n()}),N(()=>{d.value=e.loading}),_(()=>{e.immediateCheck&&n()}),y({check:n}),z("scroll",n,{target:v,passive:!0}),()=>{var t;const s=(t=a.default)==null?void 0:t.call(a),i=r("div",{ref:g,class:o("placeholder")},null);return r("div",{ref:u,role:"feed",class:o(),"aria-busy":d.value},[e.direction==="down"?s:i,S(),T(),P(),e.direction==="up"?s:i])}}});const j=H(W);export{j as L};
  5. >>>>>>>> online:dist/assets/index.d5ee0b18.js