vant/static/js/async/9543.4cb2b403.js
2024-04-20 08:49:23 +00:00

2 lines
14 KiB
JavaScript

/*! For license information please see 9543.4cb2b403.js.LICENSE.txt */
(self.webpackChunk=self.webpackChunk||[]).push([["9543"],{36799:function(e,t,l){"use strict";let i=l("77662").Z;t.Z=i},77662:function(e,t,l){"use strict";var i=l("80681"),n=l("11848"),a=l("11136"),o=l("54369");t.Z={__name:"TiledDisplay",setup(e){let t=new Date(2012,0,10),l=new Date(2012,2,20),r=(0,o.q)({"zh-CN":{calendar:"\u65E5\u5386",tiledDisplay:"\u5E73\u94FA\u5C55\u793A"},"en-US":{calendar:"Calendar",tiledDisplay:"Tiled display"}});return(e,o)=>{let s=(0,i.up)("demo-block");return(0,i.wg)(),(0,i.j4)(s,{card:"",title:(0,n.SU)(r)("tiledDisplay")},{default:(0,i.w5)(()=>[(0,i.Wm)((0,n.SU)(a.ZP),{title:(0,n.SU)(r)("calendar"),poppable:!1,"show-confirm":!1,"min-date":(0,n.SU)(t),"max-date":(0,n.SU)(l),"default-date":(0,n.SU)(t),style:{height:"500px"}},null,8,["title","min-date","max-date","default-date"])]),_:1},8,["title"])}}}},13643:function(e,t,l){"use strict";l.r(t);let i=l("31351").Z;t.default=i},31351:function(e,t,l){"use strict";l("82116"),l("17989");var i=l("80681"),n=l("11848"),a=l("99742"),o=l("11136"),r=l("54369"),s=l("36799");t.Z=(0,i.aZ)({__name:"index",setup(e){var t=(0,r.q)({"zh-CN":{in:"\u5165\u5E97",out:"\u79BB\u5E97",today:"\u4ECA\u5929",laborDay:"\u52B3\u52A8\u8282",youthDay:"\u9752\u5E74\u8282",maxRange:"\u65E5\u671F\u533A\u95F4\u6700\u5927\u8303\u56F4",selectCount:e=>"\u9009\u62E9\u4E86 ".concat(e," \u4E2A\u65E5\u671F"),selectSingle:"\u9009\u62E9\u5355\u4E2A\u65E5\u671F",selectMultiple:"\u9009\u62E9\u591A\u4E2A\u65E5\u671F",selectRange:"\u9009\u62E9\u65E5\u671F\u533A\u95F4",quickSelect:"\u5FEB\u6377\u9009\u62E9",confirmText:"\u5B8C\u6210",customColor:"\u81EA\u5B9A\u4E49\u989C\u8272",customRange:"\u81EA\u5B9A\u4E49\u65E5\u671F\u8303\u56F4",customConfirm:"\u81EA\u5B9A\u4E49\u6309\u94AE\u6587\u5B57",customDayText:"\u81EA\u5B9A\u4E49\u65E5\u671F\u6587\u6848",customPosition:"\u81EA\u5B9A\u4E49\u5F39\u51FA\u4F4D\u7F6E",customCalendar:"\u81EA\u5B9A\u4E49\u65E5\u5386",confirmDisabledText:"\u8BF7\u9009\u62E9\u7ED3\u675F\u65F6\u95F4",firstDayOfWeek:"\u81EA\u5B9A\u4E49\u5468\u8D77\u59CB\u65E5"},"en-US":{in:"In",out:"Out",today:"Today",laborDay:"Labor day",youthDay:"Youth Day",maxRange:"Max Range",selectCount:e=>"".concat(e," dates selected"),selectSingle:"Select Single Date",selectMultiple:"Select Multiple Date",selectRange:"Select Date Range",quickSelect:"Quick Select",confirmText:"OK",customColor:"Custom Color",customRange:"Custom Date Range",customConfirm:"Custom Confirm Text",customDayText:"Custom Day Text",customPosition:"Custom Position",customCalendar:"Custom Calendar",firstDayOfWeek:"Custom First Day Of Week",confirmDisabledText:"Select End Time"}}),l=(0,n.qj)({date:{maxRange:[],selectSingle:null,selectRange:[],selectMultiple:[],quickSelect1:null,quickSelect2:[],customColor:[],customConfirm:[],customRange:null,customDayText:[],customPosition:null},type:"single",round:!0,color:void 0,minDate:void 0,maxDate:void 0,maxRange:void 0,position:void 0,formatter:void 0,showConfirm:!1,showCalendar:!1,confirmText:void 0,confirmDisabledText:void 0,firstDayOfWeek:0}),c=()=>{l.round=!0,l.color=void 0,l.minDate=void 0,l.maxDate=void 0,l.maxRange=void 0,l.position=void 0,l.formatter=void 0,l.showConfirm=!0,l.confirmText=void 0,l.confirmDisabledText=void 0,l.firstDayOfWeek=0},u=e=>{if(!e.date)return e;var l=e.date.getMonth()+1,i=e.date.getDate();return 5===l&&(1===i?e.topInfo=t("laborDay"):4===i?e.topInfo=t("youthDay"):11===i&&(e.text=t("today"))),"start"===e.type?e.bottomInfo=t("in"):"end"===e.type&&(e.bottomInfo=t("out")),e},d=(e,i)=>{switch(c(),l.id=i,l.type=e,l.showCalendar=!0,i){case"quickSelect1":case"quickSelect2":l.showConfirm=!1;break;case"customColor":l.color="#ee0a24";break;case"customConfirm":l.confirmText=t("confirmText"),l.confirmDisabledText=t("confirmDisabledText");break;case"customRange":l.minDate=new Date(2010,0,1),l.maxDate=new Date(2010,0,31);break;case"customDayText":l.minDate=new Date(2010,4,1),l.maxDate=new Date(2010,4,31),l.formatter=u;break;case"customPosition":l.round=!1,l.position="right";break;case"maxRange":l.maxRange=3;break;case"firstDayOfWeek":l.firstDayOfWeek=1}},m=e=>{if(e)return"".concat(e.getMonth()+1,"/").concat(e.getDate())},f=e=>{if(e)return"".concat(e.getFullYear(),"/").concat(m(e))},v=e=>{if(e.length)return t("selectCount",e.length)},g=e=>{if(e.length){var[t,l]=e;return"".concat(m(t)," - ").concat(m(l))}},y=e=>{l.showCalendar=!1,l.date[l.id]=e};return(e,r)=>{var c=(0,i.up)("demo-block");return(0,i.wg)(),(0,i.iD)(i.HY,null,[(0,i.Wm)(c,{card:"",title:(0,n.SU)(t)("basicUsage")},{default:(0,i.w5)(()=>[(0,i.Wm)((0,n.SU)(a.ZP),{"is-link":"",title:(0,n.SU)(t)("selectSingle"),value:f(l.date.selectSingle),onClick:r[0]||(r[0]=e=>d("single","selectSingle"))},null,8,["title","value"]),(0,i.Wm)((0,n.SU)(a.ZP),{"is-link":"",title:(0,n.SU)(t)("selectMultiple"),value:v(l.date.selectMultiple),onClick:r[1]||(r[1]=e=>d("multiple","selectMultiple"))},null,8,["title","value"]),(0,i.Wm)((0,n.SU)(a.ZP),{"is-link":"",title:(0,n.SU)(t)("selectRange"),value:g(l.date.selectRange),onClick:r[2]||(r[2]=e=>d("range","selectRange"))},null,8,["title","value"])]),_:1},8,["title"]),(0,i.Wm)(c,{card:"",title:(0,n.SU)(t)("quickSelect")},{default:(0,i.w5)(()=>[(0,i.Wm)((0,n.SU)(a.ZP),{"is-link":"",title:(0,n.SU)(t)("selectSingle"),value:f(l.date.quickSelect1),onClick:r[3]||(r[3]=e=>d("single","quickSelect1"))},null,8,["title","value"]),(0,i.Wm)((0,n.SU)(a.ZP),{"is-link":"",title:(0,n.SU)(t)("selectRange"),value:g(l.date.quickSelect2),onClick:r[4]||(r[4]=e=>d("range","quickSelect2"))},null,8,["title","value"])]),_:1},8,["title"]),(0,i.Wm)(c,{card:"",title:(0,n.SU)(t)("customCalendar")},{default:(0,i.w5)(()=>[(0,i.Wm)((0,n.SU)(a.ZP),{"is-link":"",title:(0,n.SU)(t)("customColor"),value:g(l.date.customColor),onClick:r[5]||(r[5]=e=>d("range","customColor"))},null,8,["title","value"]),(0,i.Wm)((0,n.SU)(a.ZP),{"is-link":"",title:(0,n.SU)(t)("customRange"),value:f(l.date.customRange),onClick:r[6]||(r[6]=e=>d("single","customRange"))},null,8,["title","value"]),(0,i.Wm)((0,n.SU)(a.ZP),{"is-link":"",title:(0,n.SU)(t)("customConfirm"),value:g(l.date.customConfirm),onClick:r[7]||(r[7]=e=>d("range","customConfirm"))},null,8,["title","value"]),(0,i.Wm)((0,n.SU)(a.ZP),{"is-link":"",title:(0,n.SU)(t)("customDayText"),value:g(l.date.customDayText),onClick:r[8]||(r[8]=e=>d("range","customDayText"))},null,8,["title","value"]),(0,i.Wm)((0,n.SU)(a.ZP),{"is-link":"",title:(0,n.SU)(t)("customPosition"),value:f(l.date.customPosition),onClick:r[9]||(r[9]=e=>d("single","customPosition"))},null,8,["title","value"]),(0,i.Wm)((0,n.SU)(a.ZP),{"is-link":"",title:(0,n.SU)(t)("maxRange"),value:g(l.date.maxRange),onClick:r[10]||(r[10]=e=>d("range","maxRange"))},null,8,["title","value"]),(0,i.Wm)((0,n.SU)(a.ZP),{"is-link":"",title:(0,n.SU)(t)("firstDayOfWeek"),onClick:r[11]||(r[11]=e=>d("single","firstDayOfWeek"))},null,8,["title"])]),_:1},8,["title"]),(0,i.Wm)(s.Z),(0,i.Wm)((0,n.SU)(o.ZP),{show:l.showCalendar,"onUpdate:show":r[12]||(r[12]=e=>l.showCalendar=e),type:l.type,color:l.color,round:l.round,position:l.position,"min-date":l.minDate,"max-date":l.maxDate,"max-range":l.maxRange,formatter:l.formatter,"show-confirm":l.showConfirm,"confirm-text":l.confirmText,"first-day-of-week":l.firstDayOfWeek,"confirm-disabled-text":l.confirmDisabledText,onConfirm:y},null,8,["show","type","color","round","position","min-date","max-date","max-range","formatter","show-confirm","confirm-text","first-day-of-week","confirm-disabled-text"])],64)}}})},99742:function(e,t,l){"use strict";l.d(t,{bL:function(){return a}});var i=l("63112"),n=l("54499"),a=(0,i.n)(n.ZP);t.ZP=a},95786:function(e,t,l){"use strict";l.d(t,{gb:function(){return a}});var i=l("63112"),n=l("2309"),a=(0,i.n)(n.Z);t.ZP=a},20897:function(e,t,l){"use strict";l.d(t,{G:function(){return n}});var i=0;function n(e){e?(!i&&document.body.classList.add("van-toast--unclickable"),i++):i&&!--i&&document.body.classList.remove("van-toast--unclickable")}},84285:function(e,t,l){"use strict";l.d(t,{H:function(){return s},o:function(){return r}});var i=l("11848"),n=l("39594"),a=l("12308"),o=l("10023");function r(){var e=(0,i.qj)({show:!1}),t=t=>{e.show=t},l=l=>{(0,a.l7)(e,l,{transitionAppear:!0}),t(!0)},n=()=>t(!1);return(0,o.F)({open:l,close:n,toggle:t}),{open:l,close:n,state:e,toggle:t}}function s(e){var t=(0,n.ri)(e),l=document.createElement("div");return document.body.appendChild(l),{instance:t.mount(l),unmount(){t.unmount(),document.body.removeChild(l)}}}},54499:function(e,t,l){"use strict";l.d(t,{x_:function(){return d}}),l("82116"),l("17989");var i=l("80681"),n=l("62568"),a=l("78335"),o=l("12308"),r=l("6149"),s=l("96528"),[c,u]=(0,n.do)("cell"),d={tag:(0,a.SQ)("div"),icon:String,size:String,title:a.Or,value:a.Or,label:a.Or,center:Boolean,isLink:Boolean,border:a.J5,iconPrefix:String,valueClass:a.Vg,labelClass:a.Vg,titleClass:a.Vg,titleStyle:null,arrowDirection:String,required:{type:[Boolean,String],default:null},clickable:{type:Boolean,default:null}},m=(0,o.l7)({},d,r.g2);t.ZP=(0,i.aZ)({name:c,props:m,setup(e,t){var{slots:l}=t,n=(0,r.yj)(),a=()=>{if(l.label||(0,o.Xq)(e.label))return(0,i.Wm)("div",{class:[u("label"),e.labelClass]},[l.label?l.label():e.label])},c=()=>{if(l.title||(0,o.Xq)(e.title)){var t,n=null===(t=l.title)||void 0===t?void 0:t.call(l);if(!Array.isArray(n)||0!==n.length)return(0,i.Wm)("div",{class:[u("title"),e.titleClass],style:e.titleStyle},[n||(0,i.Wm)("span",null,[e.title]),a()])}},d=()=>{var t=l.value||l.default;if(t||(0,o.Xq)(e.value))return(0,i.Wm)("div",{class:[u("value"),e.valueClass]},[t?t():(0,i.Wm)("span",null,[e.value])])},m=()=>l.icon?l.icon():e.icon?(0,i.Wm)(s.JO,{name:e.icon,class:u("left-icon"),classPrefix:e.iconPrefix},null):void 0,f=()=>{if(l["right-icon"])return l["right-icon"]();if(e.isLink){var t=e.arrowDirection&&"right"!==e.arrowDirection?"arrow-".concat(e.arrowDirection):"arrow";return(0,i.Wm)(s.JO,{name:t,class:u("right-icon")},null)}};return()=>{var t,{tag:a,size:o,center:r,border:s,isLink:v,required:g}=e,y=null!==(t=e.clickable)&&void 0!==t?t:v,p={center:r,required:!!g,clickable:y,borderless:!s};return o&&(p[o]=!!o),(0,i.Wm)(a,{class:u(p),role:y?"button":void 0,tabindex:y?0:void 0,onClick:n},{default:()=>{var e;return[m(),c(),d(),f(),null===(e=l.extra)||void 0===e?void 0:e.call(l)]}})}}})},2309:function(e,t,l){"use strict";l("82116"),l("17989"),l("66786"),l("14529");var i=l("80681"),n=l("62568"),a=l("78335"),o=l("12308"),r=l("20358"),[s,c]=(0,n.do)("loading"),u=Array(12).fill(null).map((e,t)=>(0,i.Wm)("i",{class:c("line",String(t+1))},null)),d=(0,i.Wm)("svg",{class:c("circular"),viewBox:"25 25 50 50"},[(0,i.Wm)("circle",{cx:"50",cy:"50",r:"20",fill:"none"},null)]),m={size:a.Or,type:(0,a.SQ)("circular"),color:String,vertical:Boolean,textSize:a.Or,textColor:String};t.Z=(0,i.aZ)({name:s,props:m,setup(e,t){var{slots:l}=t,n=(0,i.Fl)(()=>(0,o.l7)({color:e.color},(0,r.Xn)(e.size))),a=()=>{var t="spinner"===e.type?u:d;return(0,i.Wm)("span",{class:c("spinner",e.type),style:n.value},[l.icon?l.icon():t])},s=()=>{if(l.default){var t;return(0,i.Wm)("span",{class:c("text"),style:{fontSize:(0,r.Nn)(e.textSize),color:null!==(t=e.textColor)&&void 0!==t?t:e.color}},[l.default()])}};return()=>{var{type:t,vertical:l}=e;return(0,i.Wm)("div",{class:c([t,{vertical:l}]),"aria-live":"polite","aria-busy":!0},[a(),s()])}}})},21083:function(e,t,l){"use strict";l("82116"),l("17989");var i=l("80681"),n=l("62568"),a=l("78335"),o=l("12308"),r=l("20897"),s=l("96528"),c=l("97760"),u=l("95786"),[d,m]=(0,n.do)("toast"),f=["show","overlay","teleport","transition","overlayClass","overlayStyle","closeOnClickOverlay","zIndex"],v={icon:String,show:Boolean,type:(0,a.SQ)("text"),overlay:Boolean,message:a.Or,iconSize:a.Or,duration:(0,a.qM)(2e3),position:(0,a.SQ)("middle"),teleport:[String,Object],wordBreak:String,className:a.Vg,iconPrefix:String,transition:(0,a.SQ)("van-fade"),loadingType:String,forbidClick:Boolean,overlayClass:a.Vg,overlayStyle:Object,closeOnClick:Boolean,closeOnClickOverlay:Boolean,zIndex:a.Or};t.Z=(0,i.aZ)({name:d,props:v,emits:["update:show"],setup(e,t){var l,{emit:n,slots:a}=t,d=!1,v=()=>{var t=e.show&&e.forbidClick;d!==t&&(d=t,(0,r.G)(d))},g=e=>n("update:show",e),y=()=>{e.closeOnClick&&g(!1)},p=()=>clearTimeout(l),S=()=>{var{icon:t,type:l,iconSize:n,iconPrefix:a,loadingType:o}=e;return t||"success"===l||"fail"===l?(0,i.Wm)(s.JO,{name:t||l,size:n,class:m("icon"),classPrefix:a},null):"loading"===l?(0,i.Wm)(u.gb,{class:m("loading"),size:n,type:o},null):void 0},k=()=>{var{type:t,message:l}=e;return a.message?(0,i.Wm)("div",{class:m("text")},[a.message()]):(0,o.Xq)(l)&&""!==l?"html"===t?(0,i.Wm)("div",{key:0,class:m("text"),innerHTML:String(l)},null):(0,i.Wm)("div",{class:m("text")},[l]):void 0};return(0,i.YP)(()=>[e.show,e.forbidClick],v),(0,i.YP)(()=>[e.show,e.type,e.message,e.duration],()=>{p(),e.show&&e.duration>0&&(l=setTimeout(()=>{g(!1)},e.duration))}),(0,i.bv)(v),(0,i.Ah)(v),()=>(0,i.Wm)(c.GI,(0,i.dG)({class:[m([e.position,"normal"===e.wordBreak?"break-normal":e.wordBreak,{[e.type]:!e.icon}]),e.className],lockScroll:!1,onClick:y,onClosed:p,"onUpdate:show":g},(0,o.ei)(e,f)),{default:()=>[S(),k()]})}})},13118:function(e,t,l){"use strict";l.d(t,{CF:function(){return m},LJ:function(){return y},XA:function(){return g},di:function(){return v},yg:function(){return p}}),l("24836"),l("41712"),l("80855"),l("10502"),l("7978"),l("66746"),l("17530"),l("87604"),l("57024"),l("22175"),l("85322"),l("47897"),l("48943"),l("43356"),l("82116"),l("17989"),l("96245"),l("37232"),l("70629"),l("61557"),l("31564"),l("8649");var i=l("80681"),n=l("11848"),a=l("12308"),o=l("84285"),r=l("21083"),s=[],c=(0,a.l7)({},{icon:"",type:"text",message:"",className:"",overlay:!1,onClose:void 0,onOpened:void 0,duration:2e3,teleport:"body",iconSize:void 0,iconPrefix:void 0,position:"middle",transition:"van-fade",forbidClick:!1,loadingType:void 0,overlayClass:"",overlayStyle:void 0,closeOnClick:!1,closeOnClickOverlay:!1}),u=new Map;function d(e){return(0,a.Kn)(e)?e:{message:e}}function m(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!a._f)return{};var t=function(){if(!s.length){var e=function(){var{instance:e,unmount:t}=(0,o.H)({setup(){var e=(0,n.iH)(""),{open:t,state:l,close:a,toggle:s}=(0,o.o)(),c=()=>{};return(0,i.YP)(e,e=>{l.message=e}),(0,i.FN)().render=()=>(0,i.Wm)(r.Z,(0,i.dG)(l,{onClosed:c,"onUpdate:show":s}),null),{open:t,close:a,message:e}}});return e}();s.push(e)}return s[s.length-1]}(),l=d(e);return t.open((0,a.l7)({},c,u.get(l.type||c.type),l)),t}var f=e=>t=>m((0,a.l7)({type:e},d(t))),v=f("loading"),g=f("success"),y=f("fail"),p=e=>{if(s.length){if(e)s.forEach(e=>{e.close()}),s=[];else{var t;s[0].close()}}}}}]);