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){var a,r,i,u,o=[],l=!0,s=!1;try{if(i=(e=e.call(t)).next,0===n){if(Object(e)!==e)return;l=!1}else for(;!(l=(a=i.call(e)).done)&&(o.push(a.value),o.length!==n);l=!0);}catch(c){s=!0,r=c}finally{try{if(!l&&null!=e.return&&(u=e.return(),Object(u)!==u))return}finally{if(s)throw r}}return o}}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return n(t,e);var a=Object.prototype.toString.call(t).slice(8,-1);"Object"===a&&t.constructor&&(a=t.constructor.name);if("Map"===a||"Set"===a)return Array.from(t);if("Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))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,a=new Array(n);e<n;e++)a[e]=t[e];return a}System.register(["./index-legacy-66b726ed.js","./index-legacy-9b7fc16a.js"],(function(n,e){"use strict";var a,r,i,u,o,l,s,c,d,f,h,m,g,p,v,y,_,S,b,x=document.createElement("style");return x.textContent="._animateWrap_1kuq9_1{width:1.46667rem!important;height:1.46667rem!important}._loading_1kuq9_5{height:1.46667rem!important}._loading_1kuq9_5 img{height:.8rem;width:3.2rem;margin-top:.53333rem}._pullRefresh_1kuq9_13 .van-pull-refresh__track{min-height:inherit}.lottie-animation-container{width:var(--lottie-animation-container-width);height:var(--lottie-animation-container-height);background-color:var(--lottie-animation-container-background-color);overflow:hidden;margin:0 auto}\n",document.head.appendChild(x),{setters:[function(t){a=t.j,r=t.ak,i=t.t,u=t.d,o=t.i,l=t.az,s=t.O,c=t.af,d=t.w,f=t.ag,h=t.g,m=t.$,g=t.y,p=t.aC,v=t.ah,y=t.D,_=t.F,S=t.h},function(t){b=t.I}],execute:function(){var x=t(a("pull-refresh"),3),T=x[0],k=x[1],w=x[2],V=["pulling","loosing","success"],D={disabled:Boolean,modelValue:Boolean,headHeight:r(50),successText:String,pullingText:String,loosingText:String,loadingText:String,pullDistance:i,successDuration:r(500),animationDuration:r(300)},j=u({name:T,props:D,emits:["change","refresh","update:modelValue"],setup:function(t,n){var e,a=n.emit,r=n.slots,i=o(),u=o(),y=l(i),_=s({status:"normal",distance:0,duration:0}),S=c(),b=function(){if(50!==t.headHeight)return{height:"".concat(t.headHeight,"px")}},x=function(){return"loading"!==_.status&&"success"!==_.status&&!t.disabled},T=function(n,e){var r=+(t.pullDistance||t.headHeight);_.distance=n,_.status=e?"loading":0===n?"normal":n<r?"pulling":"loosing",a("change",{status:_.status,distance:n})},D=function(){var n=_.status;return"normal"===n?"":t["".concat(n,"Text")]||w(n)},j=function(){var t=_.status,n=_.distance;if(r[t])return r[t]({distance:n});var e=[];return V.includes(t)&&e.push(h("div",{class:k("text")},[D()])),"loading"===t&&e.push(h(m,{class:k("loading")},{default:D})),e},H=function(t){(e=0===p(y.value))&&(_.duration=0,S.start(t))},q=function(t){x()&&H(t)},A=function(){e&&S.deltaY.value&&x()&&(_.duration=+t.animationDuration,"loosing"===_.status?(T(+t.headHeight,!0),a("update:modelValue",!0),g((function(){return a("refresh")}))):T(0))};return d((function(){return t.modelValue}),(function(n){_.duration=+t.animationDuration,n?T(+t.headHeight,!0):r.success||t.successText?(_.status="success",setTimeout((function(){T(0)}),+t.successDuration)):T(0,!1)})),f("touchmove",(function(n){if(x()){e||H(n);var a=S.deltaY;S.move(n),e&&a.value>=0&&S.isVertical()&&(v(n),T((r=a.value,i=+(t.pullDistance||t.headHeight),r>i&&(r=r<2*i?i+(r-i)/2:1.5*i+(r-2*i)/4),Math.round(r))))}var r,i}),{target:u}),function(){var t,n={transitionDuration:"".concat(_.duration,"ms"),transform:_.distance?"translate3d(0,".concat(_.distance,"px, 0)"):""};return h("div",{ref:i,class:k()},[h("div",{ref:u,class:k("track"),style:n,onTouchstartPassive:q,onTouchend:A,onTouchcancel:A},[h("div",{class:k("head"),style:b()},[j()]),null==(t=r.default)?void 0:t.call(r)])])}}}),H=y(j),q="_loading_1kuq9_5",A="_pullRefresh_1kuq9_13",O=""+new URL("loading-9729222e.gif",e.meta.url).href;n("M",u({name:"s-full-refresh",props:{title:String,modelValue:{type:Boolean,default:!1}},emits:["refresh","update:modelValue"],setup:function(t,n){var e=n.emit,a=n.slots,r=s({fullState:!1});return d((function(){return t.modelValue}),(function(t){r.fullState=t})),d((function(){return r.fullState}),(function(t){e("update:modelValue",t)})),function(){return h(H,{modelValue:r.fullState,"onUpdate:modelValue":function(t){return r.fullState=t},onRefresh:function(){return e("refresh")},loadingText:" ",class:A},{loading:function(){return h("div",null,[h(b,{src:O,class:q},null)])},pulling:function(){return h("div",null,[h(b,{src:O,class:q},null)])},loosing:function(){return h("div",null,[h(b,{src:O,class:q},null)])},default:function(){return h(_,null,[S(" "),a.default&&a.default()])}})}}}))}}}))}();
|