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

2 lines
15 KiB
JavaScript

/*! For license information please see 4711.e9a54558.js.LICENSE.txt */
(self.webpackChunk=self.webpackChunk||[]).push([["4711"],{5691:function(e,t,i){"use strict";i.r(t);let o=i("33718").Z;t.default=o},33718:function(e,t,i){"use strict";var o=i("80681"),l=i("11848"),n=i("99742"),r=i("7197"),a=i("54369"),s=i("24647"),c=i("13118"),u=i("82055");t.Z=(0,o.aZ)({__name:"index",setup(e){var t=(0,a.q)({"zh-CN":{fail:"\u5931\u8D25\u63D0\u793A",text:"\u63D0\u793A\u5185\u5BB9",text2:"\u6210\u529F\u6587\u6848",text3:"\u5931\u8D25\u6587\u6848",text4:e=>"\u5012\u8BA1\u65F6 ".concat(e," \u79D2"),title1:"\u6587\u5B57\u63D0\u793A",title2:"\u52A0\u8F7D\u63D0\u793A",title3:"\u6210\u529F/\u5931\u8D25\u63D0\u793A",success:"\u6210\u529F\u63D0\u793A",breakAll:"\u6362\u884C\u65F6\u622A\u65AD\u5355\u8BCD",breakWord:"\u6362\u884C\u65F6\u4E0D\u622A\u65AD\u5355\u8BCD",wordBreak:"\u6587\u5B57\u6362\u884C\u65B9\u5F0F",customIcon:"\u81EA\u5B9A\u4E49\u56FE\u6807",customImage:"\u81EA\u5B9A\u4E49\u56FE\u7247",loadingType:"\u81EA\u5B9A\u4E49\u52A0\u8F7D\u56FE\u6807",positionTop:"\u9876\u90E8\u5C55\u793A",useComponent:"\u4F7F\u7528 Toast \u7EC4\u4EF6",updateMessage:"\u52A8\u6001\u66F4\u65B0\u63D0\u793A",positionBottom:"\u5E95\u90E8\u5C55\u793A",customPosition:"\u81EA\u5B9A\u4E49\u4F4D\u7F6E"},"en-US":{fail:"Fail",text:"Some messages",text2:"Success",text3:"Fail",text4:e=>"".concat(e," seconds"),title1:"Text",title2:"Loading",title3:"Success/Fail",success:"Success",wordBreak:"Word Break",breakAll:"Break All",breakWord:"Break Word",customIcon:"Custom Icon",customImage:"Custom Image",loadingType:"Loading Type",positionTop:"Top",useComponent:"Use Toast Component",updateMessage:"Update Message",positionBottom:"Bottom",customPosition:"Custom Position"}}),i=e=>{(0,c.di)({forbidClick:!0,message:t("loading"),loadingType:e})},d=()=>{(0,c.CF)({message:t("positionTop"),position:"top"})},v=()=>{(0,c.CF)({message:t("positionBottom"),position:"bottom"})},m=()=>{(0,c.CF)({message:t("customIcon"),icon:"like-o"})},f=()=>{(0,c.CF)({message:t("customImage"),icon:(0,s.RQ)("logo.png")})},p=()=>{var e=(0,c.di)({duration:0,forbidClick:!0,message:t("text4",3)}),i=3,o=setInterval(()=>{--i?e.message=t("text4",i):(clearInterval(o),(0,c.yg)())},1e3)},g=e=>{(0,c.CF)({message:"This message will contain a incomprehensibilities long word.",wordBreak:e})},S=(0,l.iH)(!1),k=(0,s.RQ)("cat.jpeg");return(e,a)=>{var s=(0,o.up)("demo-block");return(0,o.wg)(),(0,o.iD)(o.HY,null,[(0,o.Wm)(s,{card:"",title:(0,l.SU)(t)("basicUsage")},{default:(0,o.w5)(()=>[(0,o.Wm)((0,l.SU)(n.ZP),{"is-link":"",title:(0,l.SU)(t)("title1"),onClick:a[0]||(a[0]=e=>(0,l.SU)(c.CF)((0,l.SU)(t)("text")))},null,8,["title"]),(0,o.Wm)((0,l.SU)(n.ZP),{"is-link":"",title:(0,l.SU)(t)("title2"),onClick:a[1]||(a[1]=e=>i())},null,8,["title"]),(0,o.Wm)((0,l.SU)(n.ZP),{"is-link":"",title:(0,l.SU)(t)("success"),onClick:a[2]||(a[2]=e=>(0,l.SU)(c.XA)((0,l.SU)(t)("text2")))},null,8,["title"]),(0,o.Wm)((0,l.SU)(n.ZP),{"is-link":"",title:(0,l.SU)(t)("fail"),onClick:a[3]||(a[3]=e=>(0,l.SU)(c.LJ)((0,l.SU)(t)("text3")))},null,8,["title"])]),_:1},8,["title"]),(0,o.Wm)(s,{card:"",title:(0,l.SU)(t)("customIcon")},{default:(0,o.w5)(()=>[(0,o.Wm)((0,l.SU)(n.ZP),{"is-link":"",title:(0,l.SU)(t)("customIcon"),onClick:m},null,8,["title"]),(0,o.Wm)((0,l.SU)(n.ZP),{"is-link":"",title:(0,l.SU)(t)("customImage"),onClick:f},null,8,["title"]),(0,o.Wm)((0,l.SU)(n.ZP),{"is-link":"",title:(0,l.SU)(t)("loadingType"),onClick:a[4]||(a[4]=e=>i("spinner"))},null,8,["title"])]),_:1},8,["title"]),(0,o.Wm)(s,{card:"",title:(0,l.SU)(t)("customPosition")},{default:(0,o.w5)(()=>[(0,o.Wm)((0,l.SU)(n.ZP),{"is-link":"",title:(0,l.SU)(t)("positionTop"),onClick:d},null,8,["title"]),(0,o.Wm)((0,l.SU)(n.ZP),{"is-link":"",title:(0,l.SU)(t)("positionBottom"),onClick:v},null,8,["title"])]),_:1},8,["title"]),(0,o.Wm)(s,{card:"",title:(0,l.SU)(t)("wordBreak")},{default:(0,o.w5)(()=>[(0,o.Wm)((0,l.SU)(n.ZP),{"is-link":"",title:(0,l.SU)(t)("breakAll"),onClick:a[5]||(a[5]=e=>g("break-all"))},null,8,["title"]),(0,o.Wm)((0,l.SU)(n.ZP),{"is-link":"",title:(0,l.SU)(t)("breakWord"),onClick:a[6]||(a[6]=e=>g("break-word"))},null,8,["title"])]),_:1},8,["title"]),(0,o.Wm)(s,{card:"",title:(0,l.SU)(t)("updateMessage")},{default:(0,o.w5)(()=>[(0,o.Wm)((0,l.SU)(n.ZP),{"is-link":"",title:(0,l.SU)(t)("updateMessage"),onClick:p},null,8,["title"])]),_:1},8,["title"]),(0,o.Wm)(s,{card:"",title:(0,l.SU)(t)("useComponent")},{default:(0,o.w5)(()=>[(0,o.Wm)((0,l.SU)(n.ZP),{"is-link":"",title:(0,l.SU)(t)("useComponent"),onClick:a[7]||(a[7]=e=>S.value=!0)},null,8,["title"]),(0,o.Wm)((0,l.SU)(u.ZP),{show:S.value,"onUpdate:show":a[8]||(a[8]=e=>S.value=e),style:{padding:"0"}},{message:(0,o.w5)(()=>[(0,o.Wm)((0,l.SU)(r.ZP),{src:(0,l.SU)(k),width:"200",height:"140",style:{display:"block"}},null,8,["src"])]),_:1},8,["show"])]),_:1},8,["title"])],64)}}})},24647:function(e,t,i){"use strict";i.d(t,{RQ:function(){return o}});var o=e=>"https://fastly.jsdelivr.net/npm/@vant/assets/".concat(e)},99742:function(e,t,i){"use strict";i.d(t,{bL:function(){return n}});var o=i("63112"),l=i("54499"),n=(0,o.n)(l.ZP);t.ZP=n},6149:function(e,t,i){"use strict";i.d(t,{BC:function(){return n},g2:function(){return l},yj:function(){return r}}),i("56115"),i("59644");var o=i("80681"),l={to:[String,Object],url:String,replace:Boolean};function n(e){var{to:t,url:i,replace:o,$router:l}=e;t&&l?l[o?"replace":"push"](t):i&&(o?location.replace(i):location.href=i)}function r(){var e=(0,o.FN)().proxy;return()=>n(e)}},7197:function(e,t,i){"use strict";i.d(t,{Ee:function(){return n}});var o=i("63112"),l=i("46858"),n=(0,o.n)(l.Z);t.ZP=n},95786:function(e,t,i){"use strict";i.d(t,{gb:function(){return n}});var o=i("63112"),l=i("2309"),n=(0,o.n)(l.Z);t.ZP=n},82055:function(e,t,i){"use strict";var o=i("63112"),l=i("21083"),n=(0,o.n)(l.Z);t.ZP=n},20897:function(e,t,i){"use strict";i.d(t,{G:function(){return l}});var o=0;function l(e){e?(!o&&document.body.classList.add("van-toast--unclickable"),o++):o&&!--o&&document.body.classList.remove("van-toast--unclickable")}},84285:function(e,t,i){"use strict";i.d(t,{H:function(){return s},o:function(){return a}});var o=i("11848"),l=i("39594"),n=i("12308"),r=i("10023");function a(){var e=(0,o.qj)({show:!1}),t=t=>{e.show=t},i=i=>{(0,n.l7)(e,i,{transitionAppear:!0}),t(!0)},l=()=>t(!1);return(0,r.F)({open:i,close:l,toggle:t}),{open:i,close:l,state:e,toggle:t}}function s(e){var t=(0,l.ri)(e),i=document.createElement("div");return document.body.appendChild(i),{instance:t.mount(i),unmount(){t.unmount(),document.body.removeChild(i)}}}},54499:function(e,t,i){"use strict";i.d(t,{x_:function(){return d}}),i("82116"),i("17989");var o=i("80681"),l=i("62568"),n=i("78335"),r=i("12308"),a=i("6149"),s=i("96528"),[c,u]=(0,l.do)("cell"),d={tag:(0,n.SQ)("div"),icon:String,size:String,title:n.Or,value:n.Or,label:n.Or,center:Boolean,isLink:Boolean,border:n.J5,iconPrefix:String,valueClass:n.Vg,labelClass:n.Vg,titleClass:n.Vg,titleStyle:null,arrowDirection:String,required:{type:[Boolean,String],default:null},clickable:{type:Boolean,default:null}},v=(0,r.l7)({},d,a.g2);t.ZP=(0,o.aZ)({name:c,props:v,setup(e,t){var{slots:i}=t,l=(0,a.yj)(),n=()=>{if(i.label||(0,r.Xq)(e.label))return(0,o.Wm)("div",{class:[u("label"),e.labelClass]},[i.label?i.label():e.label])},c=()=>{if(i.title||(0,r.Xq)(e.title)){var t,l=null===(t=i.title)||void 0===t?void 0:t.call(i);if(!Array.isArray(l)||0!==l.length)return(0,o.Wm)("div",{class:[u("title"),e.titleClass],style:e.titleStyle},[l||(0,o.Wm)("span",null,[e.title]),n()])}},d=()=>{var t=i.value||i.default;if(t||(0,r.Xq)(e.value))return(0,o.Wm)("div",{class:[u("value"),e.valueClass]},[t?t():(0,o.Wm)("span",null,[e.value])])},v=()=>i.icon?i.icon():e.icon?(0,o.Wm)(s.JO,{name:e.icon,class:u("left-icon"),classPrefix:e.iconPrefix},null):void 0,m=()=>{if(i["right-icon"])return i["right-icon"]();if(e.isLink){var t=e.arrowDirection&&"right"!==e.arrowDirection?"arrow-".concat(e.arrowDirection):"arrow";return(0,o.Wm)(s.JO,{name:t,class:u("right-icon")},null)}};return()=>{var t,{tag:n,size:r,center:a,border:s,isLink:f,required:p}=e,g=null!==(t=e.clickable)&&void 0!==t?t:f,S={center:a,required:!!p,clickable:g,borderless:!s};return r&&(S[r]=!!r),(0,o.Wm)(n,{class:u(S),role:g?"button":void 0,tabindex:g?0:void 0,onClick:l},{default:()=>{var e;return[v(),c(),d(),m(),null===(e=i.extra)||void 0===e?void 0:e.call(i)]}})}}})},46858:function(e,t,i){"use strict";i("82116"),i("17989");var o=i("80681"),l=i("11848"),n=i("62568"),r=i("78335"),a=i("20358"),s=i("12308"),c=i("96528"),[u,d]=(0,n.do)("image"),v={src:String,alt:String,fit:String,position:String,round:Boolean,block:Boolean,width:r.Or,height:r.Or,radius:r.Or,lazyLoad:Boolean,iconSize:r.Or,showError:r.J5,errorIcon:(0,r.SQ)("photo-fail"),iconPrefix:String,showLoading:r.J5,loadingIcon:(0,r.SQ)("photo"),crossorigin:String,referrerpolicy:String};t.Z=(0,o.aZ)({name:u,props:v,emits:["load","error"],setup(e,t){var{emit:i,slots:n}=t,r=(0,l.iH)(!1),u=(0,l.iH)(!0),v=(0,l.iH)(),{$Lazyload:m}=(0,o.FN)().proxy,f=(0,o.Fl)(()=>{var t={width:(0,a.Nn)(e.width),height:(0,a.Nn)(e.height)};return(0,s.Xq)(e.radius)&&(t.overflow="hidden",t.borderRadius=(0,a.Nn)(e.radius)),t});(0,o.YP)(()=>e.src,()=>{r.value=!1,u.value=!0});var p=e=>{u.value&&(u.value=!1,i("load",e))},g=()=>{var e=new Event("load");Object.defineProperty(e,"target",{value:v.value,enumerable:!0}),p(e)},S=e=>{r.value=!0,u.value=!1,i("error",e)},k=(t,i,l)=>l?l():(0,o.Wm)(c.JO,{name:t,size:e.iconSize,class:i,classPrefix:e.iconPrefix},null),y=()=>u.value&&e.showLoading?(0,o.Wm)("div",{class:d("loading")},[k(e.loadingIcon,d("loading-icon"),n.loading)]):r.value&&e.showError?(0,o.Wm)("div",{class:d("error")},[k(e.errorIcon,d("error-icon"),n.error)]):void 0,b=()=>{if(!r.value&&e.src){var t={alt:e.alt,class:d("img"),style:{objectFit:e.fit,objectPosition:e.position},crossorigin:e.crossorigin,referrerpolicy:e.referrerpolicy};return e.lazyLoad?(0,o.wy)((0,o.Wm)("img",(0,o.dG)({ref:v},t),null),[[(0,o.Q2)("lazy"),e.src]]):(0,o.Wm)("img",(0,o.dG)({ref:v,src:e.src,onLoad:p,onError:S},t),null)}},C=e=>{var{el:t}=e,i=()=>{t===v.value&&u.value&&g()};v.value?i():(0,o.Y3)(i)},h=e=>{var{el:t}=e;t===v.value&&!r.value&&S()};return m&&s._f&&(m.$on("loaded",C),m.$on("error",h),(0,o.Jd)(()=>{m.$off("loaded",C),m.$off("error",h)})),(0,o.bv)(()=>{(0,o.Y3)(()=>{var t;(null===(t=v.value)||void 0===t?void 0:t.complete)&&!e.lazyLoad&&g()})}),()=>{var t;return(0,o.Wm)("div",{class:d({round:e.round,block:e.block}),style:f.value},[b(),y(),null===(t=n.default)||void 0===t?void 0:t.call(n)])}}})},2309:function(e,t,i){"use strict";i("82116"),i("17989"),i("66786"),i("14529");var o=i("80681"),l=i("62568"),n=i("78335"),r=i("12308"),a=i("20358"),[s,c]=(0,l.do)("loading"),u=Array(12).fill(null).map((e,t)=>(0,o.Wm)("i",{class:c("line",String(t+1))},null)),d=(0,o.Wm)("svg",{class:c("circular"),viewBox:"25 25 50 50"},[(0,o.Wm)("circle",{cx:"50",cy:"50",r:"20",fill:"none"},null)]),v={size:n.Or,type:(0,n.SQ)("circular"),color:String,vertical:Boolean,textSize:n.Or,textColor:String};t.Z=(0,o.aZ)({name:s,props:v,setup(e,t){var{slots:i}=t,l=(0,o.Fl)(()=>(0,r.l7)({color:e.color},(0,a.Xn)(e.size))),n=()=>{var t="spinner"===e.type?u:d;return(0,o.Wm)("span",{class:c("spinner",e.type),style:l.value},[i.icon?i.icon():t])},s=()=>{if(i.default){var t;return(0,o.Wm)("span",{class:c("text"),style:{fontSize:(0,a.Nn)(e.textSize),color:null!==(t=e.textColor)&&void 0!==t?t:e.color}},[i.default()])}};return()=>{var{type:t,vertical:i}=e;return(0,o.Wm)("div",{class:c([t,{vertical:i}]),"aria-live":"polite","aria-busy":!0},[n(),s()])}}})},21083:function(e,t,i){"use strict";i("82116"),i("17989");var o=i("80681"),l=i("62568"),n=i("78335"),r=i("12308"),a=i("20897"),s=i("96528"),c=i("97760"),u=i("95786"),[d,v]=(0,l.do)("toast"),m=["show","overlay","teleport","transition","overlayClass","overlayStyle","closeOnClickOverlay","zIndex"],f={icon:String,show:Boolean,type:(0,n.SQ)("text"),overlay:Boolean,message:n.Or,iconSize:n.Or,duration:(0,n.qM)(2e3),position:(0,n.SQ)("middle"),teleport:[String,Object],wordBreak:String,className:n.Vg,iconPrefix:String,transition:(0,n.SQ)("van-fade"),loadingType:String,forbidClick:Boolean,overlayClass:n.Vg,overlayStyle:Object,closeOnClick:Boolean,closeOnClickOverlay:Boolean,zIndex:n.Or};t.Z=(0,o.aZ)({name:d,props:f,emits:["update:show"],setup(e,t){var i,{emit:l,slots:n}=t,d=!1,f=()=>{var t=e.show&&e.forbidClick;d!==t&&(d=t,(0,a.G)(d))},p=e=>l("update:show",e),g=()=>{e.closeOnClick&&p(!1)},S=()=>clearTimeout(i),k=()=>{var{icon:t,type:i,iconSize:l,iconPrefix:n,loadingType:r}=e;return t||"success"===i||"fail"===i?(0,o.Wm)(s.JO,{name:t||i,size:l,class:v("icon"),classPrefix:n},null):"loading"===i?(0,o.Wm)(u.gb,{class:v("loading"),size:l,type:r},null):void 0},y=()=>{var{type:t,message:i}=e;return n.message?(0,o.Wm)("div",{class:v("text")},[n.message()]):(0,r.Xq)(i)&&""!==i?"html"===t?(0,o.Wm)("div",{key:0,class:v("text"),innerHTML:String(i)},null):(0,o.Wm)("div",{class:v("text")},[i]):void 0};return(0,o.YP)(()=>[e.show,e.forbidClick],f),(0,o.YP)(()=>[e.show,e.type,e.message,e.duration],()=>{S(),e.show&&e.duration>0&&(i=setTimeout(()=>{p(!1)},e.duration))}),(0,o.bv)(f),(0,o.Ah)(f),()=>(0,o.Wm)(c.GI,(0,o.dG)({class:[v([e.position,"normal"===e.wordBreak?"break-normal":e.wordBreak,{[e.type]:!e.icon}]),e.className],lockScroll:!1,onClick:g,onClosed:S,"onUpdate:show":p},(0,r.ei)(e,m)),{default:()=>[k(),y()]})}})},13118:function(e,t,i){"use strict";i.d(t,{CF:function(){return v},LJ:function(){return g},XA:function(){return p},di:function(){return f},yg:function(){return S}}),i("24836"),i("41712"),i("80855"),i("10502"),i("7978"),i("66746"),i("17530"),i("87604"),i("57024"),i("22175"),i("85322"),i("47897"),i("48943"),i("43356"),i("82116"),i("17989"),i("96245"),i("37232"),i("70629"),i("61557"),i("31564"),i("8649");var o=i("80681"),l=i("11848"),n=i("12308"),r=i("84285"),a=i("21083"),s=[],c=(0,n.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,n.Kn)(e)?e:{message:e}}function v(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!n._f)return{};var t=function(){if(!s.length){var e=function(){var{instance:e,unmount:t}=(0,r.H)({setup(){var e=(0,l.iH)(""),{open:t,state:i,close:n,toggle:s}=(0,r.o)(),c=()=>{};return(0,o.YP)(e,e=>{i.message=e}),(0,o.FN)().render=()=>(0,o.Wm)(a.Z,(0,o.dG)(i,{onClosed:c,"onUpdate:show":s}),null),{open:t,close:n,message:e}}});return e}();s.push(e)}return s[s.length-1]}(),i=d(e);return t.open((0,n.l7)({},c,u.get(i.type||c.type),i)),t}var m=e=>t=>v((0,n.l7)({type:e},d(t))),f=m("loading"),p=m("success"),g=m("fail"),S=e=>{if(s.length){if(e)s.forEach(e=>{e.close()}),s=[];else{var t;s[0].close()}}}}}]);