1 |
- !function(){function t(t,n){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var a,r,u,o,i=[],l=!0,c=!1;try{if(u=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;l=!1}else for(;!(l=(a=u.call(n)).done)&&(i.push(a.value),i.length!==e);l=!0);}catch(s){c=!0,r=s}finally{try{if(!l&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(c)throw r}}return i}}(t,n)||function(t,n){if(!t)return;if("string"==typeof t)return e(t,n);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 e(t,n)}(t,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 e(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,a=new Array(e);n<e;n++)a[n]=t[n];return a}System.register(["./index-legacy-61fa3446.js","./index-legacy-976a1d2d.js"],(function(e,n){"use strict";var a,r,u,o,i,l,c,s,f,d,m,h,g,p,v,y,D,x,V,w,_,b,S,T,k,A,F,Y,j;return{setters:[function(t){a=t.a9,r=t.ah,u=t.aP,o=t._,i=t.c,l=t.aQ,c=t.d,s=t.r,f=t.e,d=t.w,m=t.aR,h=t.a,g=t.h,p=t.ae,v=t.k,y=t.b,D=t.n,x=t.aS,V=t.x,w=t.u,_=t.Y,b=t.L,S=t.z,T=t.aT,k=t.p,A=t.F,F=t.A},function(t){Y=t.p,j=t.P}],execute:function(){var n=document.createElement("style");n.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(n);var M=a({},Y,{modelValue:r(),filter:Function,formatter:{type:Function,default:function(t,e){return e}}}),H=Object.keys(Y);var C=function(t,e,n,a,r,o){var i=function(t,e){if(t<0)return[];for(var n=Array(t),a=-1;++a<t;)n[a]=e(a);return n}(e-t+1,(function(e){var r=u(t+e);return a(n,{text:r,value:r})}));return r?r(n,i,o):i},O=(new Date).getFullYear(),q=t(i("date-picker"),1)[0],P=a({},M,{columnsType:{type:Array,default:function(){return["year","month","day"]}},minDate:{type:Date,default:function(){return new Date(O-10,0,1)},validator:l},maxDate:{type:Date,default:function(){return new Date(O+10,11,31)},validator:l}}),R=c({name:q,props:P,emits:["confirm","cancel","change","update:modelValue"],setup:function(t,e){var n=e.emit,a=e.slots,r=s(t.modelValue),i=s(!1),l=function(e){return e===t.minDate.getFullYear()},c=function(e){return e===t.maxDate.getFullYear()},v=function(e){var n=t.minDate,a=t.columnsType.indexOf(e),u=i.value?t.modelValue[a]:r.value[a];if(u)return+u;switch(e){case"year":return n.getFullYear();case"month":return n.getMonth()+1;case"day":return n.getDate()}},y=function(){var e=v("year"),n=v("month"),a=l(e)&&function(e){return e===t.minDate.getMonth()+1}(n)?t.minDate.getDate():1,r=c(e)&&function(e){return e===t.maxDate.getMonth()+1}(n)?t.maxDate.getDate():function(t,e){return 32-new Date(t,e-1,32).getDate()}(e,n);return C(a,r,"day",t.formatter,t.filter)},D=f((function(){return t.columnsType.map((function(e){switch(e){case"year":return u=t.minDate.getFullYear(),o=t.maxDate.getFullYear(),C(u,o,"year",t.formatter,t.filter);case"month":return n=v("year"),a=l(n)?t.minDate.getMonth()+1:1,r=c(n)?t.maxDate.getMonth()+1:12,C(a,r,"month",t.formatter,t.filter);case"day":return y();default:throw new Error("[Vant] DatePicker: unsupported columns type: ".concat(e))}var n,a,r,u,o}))}));d(r,(function(e){m(e,t.modelValue)||n("update:modelValue",e)})),d((function(){return t.modelValue}),(function(t,e){i.value=m(e,r.value),t=function(t,e){return t.map((function(t,n){var a=e[n];if(a.length){var r=+a[0].value,i=+a[a.length-1].value;return u(o(+t,r,i))}return t}))}(t,D.value),m(t,r.value)||(r.value=t),i.value=!1}),{immediate:!0});var x=function(){for(var t=arguments.length,e=new Array(t),a=0;a<t;a++)e[a]=arguments[a];return n.apply(void 0,["change"].concat(e))},V=function(){for(var t=arguments.length,e=new Array(t),a=0;a<t;a++)e[a]=arguments[a];return n.apply(void 0,["cancel"].concat(e))},w=function(){for(var t=arguments.length,e=new Array(t),a=0;a<t;a++)e[a]=arguments[a];return n.apply(void 0,["confirm"].concat(e))};return function(){return h(j,g({modelValue:r.value,"onUpdate:modelValue":function(t){return r.value=t},columns:D.value,onChange:x,onCancel:V,onConfirm:w},p(t,H)),a)}}}),B=(e("D",v(R)),t(i("pull-refresh"),3)),E=B[0],I=B[1],U=B[2],z=["pulling","loosing","success"],L={disabled:Boolean,modelValue:Boolean,headHeight:y(50),successText:String,pullingText:String,loosingText:String,loadingText:String,pullDistance:D,successDuration:y(500),animationDuration:y(300)},Q=c({name:E,props:L,emits:["change","refresh","update:modelValue"],setup:function(t,e){var n,a=e.emit,r=e.slots,u=s(),o=s(),i=x(u),l=V({status:"normal",distance:0,duration:0}),c=w(),f=function(){if(50!==t.headHeight)return{height:"".concat(t.headHeight,"px")}},m=function(){return"loading"!==l.status&&"success"!==l.status&&!t.disabled},g=function(e,n){var r=+(t.pullDistance||t.headHeight);l.distance=e,l.status=n?"loading":0===e?"normal":e<r?"pulling":"loosing",a("change",{status:l.status,distance:e})},p=function(){var e=l.status;return"normal"===e?"":t["".concat(e,"Text")]||U(e)},v=function(){var t=l.status,e=l.distance;if(r[t])return r[t]({distance:e});var n=[];return z.includes(t)&&n.push(h("div",{class:I("text")},[p()])),"loading"===t&&n.push(h(b,{class:I("loading")},{default:p})),n},y=function(t){(n=0===T(i.value))&&(l.duration=0,c.start(t))},D=function(t){m()&&y(t)},A=function(){n&&c.deltaY.value&&m()&&(l.duration=+t.animationDuration,"loosing"===l.status?(g(+t.headHeight,!0),a("update:modelValue",!0),S((function(){return a("refresh")}))):g(0))};return d((function(){return t.modelValue}),(function(e){l.duration=+t.animationDuration,e?g(+t.headHeight,!0):r.success||t.successText?(l.status="success",setTimeout((function(){g(0)}),+t.successDuration)):g(0,!1)})),_("touchmove",(function(e){if(m()){n||y(e);var a=c.deltaY;c.move(e),n&&a.value>=0&&c.isVertical()&&(k(e),g((r=a.value,u=+(t.pullDistance||t.headHeight),r>u&&(r=r<2*u?u+(r-u)/2:1.5*u+(r-2*u)/4),Math.round(r))))}var r,u}),{target:o}),function(){var t,e={transitionDuration:"".concat(l.duration,"ms"),transform:l.distance?"translate3d(0,".concat(l.distance,"px, 0)"):""};return h("div",{ref:u,class:I()},[h("div",{ref:o,class:I("track"),style:e,onTouchstartPassive:D,onTouchend:A,onTouchcancel:A},[h("div",{class:I("head"),style:f()},[v()]),null==(t=r.default)?void 0:t.call(r)])])}}}),W=v(Q),$="_pullRefresh_1kuq9_13";e("M",c({name:"m-full-refresh",props:{title:String,modelValue:{type:Boolean,default:!1}},emits:["refresh","update:modelValue"],setup:function(t,e){var n=e.emit,a=e.slots,r=V({fullState:!1});return d((function(){return t.modelValue}),(function(t){r.fullState=t})),d((function(){return r.fullState}),(function(t){n("update:modelValue",t)})),function(){return h(W,{modelValue:r.fullState,"onUpdate:modelValue":function(t){return r.fullState=t},onRefresh:function(){return n("refresh")},loadingText:" ",class:$},{default:function(){return h(A,null,[F(" "),a.default&&a.default()])}})}}}))}}}))}();
|