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

2 lines
13 KiB
JavaScript

/*! For license information please see 1581.212b7755.js.LICENSE.txt */
(self.webpackChunk=self.webpackChunk||[]).push([["1581"],{63774:function(e,t,n){"use strict";n.r(t);let i=n("52691").Z;t.default=i},52691:function(e,t,n){"use strict";var i=n("80681"),o=n("11848"),l=n("99742"),a=n("92062"),r=n("54369"),c=n("24647"),s=n("13118");t.Z=(0,i.aZ)({__name:"index",setup(e){var t=(0,r.q)({"zh-CN":{qq:"QQ",name:"\u540D\u79F0",link:"\u590D\u5236\u94FE\u63A5",title:"\u7ACB\u5373\u5206\u4EAB\u7ED9\u597D\u53CB",weibo:"\u5FAE\u535A",wechat:"\u5FAE\u4FE1",poster:"\u5206\u4EAB\u6D77\u62A5",qrcode:"\u4E8C\u7EF4\u7801",multiLine:"\u5C55\u793A\u591A\u884C\u9009\u9879",showSheet:"\u663E\u793A\u5206\u4EAB\u9762\u677F",withDesc:"\u5C55\u793A\u63CF\u8FF0\u4FE1\u606F",customIcon:"\u81EA\u5B9A\u4E49\u56FE\u6807",description:"\u63CF\u8FF0\u4FE1\u606F",weappQrcode:"\u5C0F\u7A0B\u5E8F\u7801",wechatMoments:"\u670B\u53CB\u5708"},"en-US":{qq:"QQ",name:"Name",link:"Link",title:"Share",weibo:"Weibo",wechat:"WeChat",poster:"Poster",qrcode:"Qrcode",multiLine:"Multi Line",showSheet:"Show ShareSheet",withDesc:"Show Description",customIcon:"Custom Icon",description:"Description",weappQrcode:"Weapp Qrcode",wechatMoments:"WeChat Moments"}}),n=(0,o.iH)(!1),u=(0,o.iH)(!1),d=(0,o.iH)(!1),m=(0,o.iH)(!1),p=(0,i.Fl)(()=>[{name:t("wechat"),icon:"wechat"},{name:t("weibo"),icon:"weibo"},{name:t("link"),icon:"link"},{name:t("poster"),icon:"poster"},{name:t("qrcode"),icon:"qrcode"}]),v=(0,i.Fl)(()=>[[{name:t("wechat"),icon:"wechat"},{name:t("wechatMoments"),icon:"wechat-moments"},{name:t("weibo"),icon:"weibo"},{name:t("qq"),icon:"qq"}],[{name:t("link"),icon:"link"},{name:t("poster"),icon:"poster"},{name:t("qrcode"),icon:"qrcode"},{name:t("weappQrcode"),icon:"weapp-qrcode"}]]),h=(0,i.Fl)(()=>[{name:t("name"),icon:(0,c.RQ)("custom-icon-fire.png")},{name:t("name"),icon:(0,c.RQ)("custom-icon-light.png")},{name:t("name"),icon:(0,c.RQ)("custom-icon-water.png")},{name:t("name"),icon:"label"}]),f=(0,i.Fl)(()=>[{name:t("wechat"),icon:"wechat"},{name:t("weibo"),icon:"weibo"},{name:t("link"),icon:"link",description:t("description")},{name:t("poster"),icon:"poster"},{name:t("qrcode"),icon:"qrcode"}]),w=e=>{(0,s.CF)(e.name),n.value=!1,u.value=!1,d.value=!1,m.value=!1};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,o.SU)(t)("basicUsage")},{default:(0,i.w5)(()=>[(0,i.Wm)((0,o.SU)(l.ZP),{"is-link":"",title:(0,o.SU)(t)("showSheet"),onClick:r[0]||(r[0]=e=>n.value=!0)},null,8,["title"]),(0,i.Wm)((0,o.SU)(a.ZP),{show:n.value,"onUpdate:show":r[1]||(r[1]=e=>n.value=e),title:(0,o.SU)(t)("title"),options:p.value,onSelect:w},null,8,["show","title","options"])]),_:1},8,["title"]),(0,i.Wm)(c,{card:"",title:(0,o.SU)(t)("multiLine")},{default:(0,i.w5)(()=>[(0,i.Wm)((0,o.SU)(l.ZP),{"is-link":"",title:(0,o.SU)(t)("showSheet"),onClick:r[2]||(r[2]=e=>d.value=!0)},null,8,["title"]),(0,i.Wm)((0,o.SU)(a.ZP),{show:d.value,"onUpdate:show":r[3]||(r[3]=e=>d.value=e),title:(0,o.SU)(t)("title"),options:v.value,onSelect:w},null,8,["show","title","options"])]),_:1},8,["title"]),(0,i.Wm)(c,{card:"",title:(0,o.SU)(t)("customIcon")},{default:(0,i.w5)(()=>[(0,i.Wm)((0,o.SU)(l.ZP),{"is-link":"",title:(0,o.SU)(t)("showSheet"),onClick:r[4]||(r[4]=e=>m.value=!0)},null,8,["title"]),(0,i.Wm)((0,o.SU)(a.ZP),{show:m.value,"onUpdate:show":r[5]||(r[5]=e=>m.value=e),options:h.value,onSelect:w},null,8,["show","options"])]),_:1},8,["title"]),(0,i.Wm)(c,{card:"",title:(0,o.SU)(t)("withDesc")},{default:(0,i.w5)(()=>[(0,i.Wm)((0,o.SU)(l.ZP),{"is-link":"",title:(0,o.SU)(t)("showSheet"),onClick:r[6]||(r[6]=e=>u.value=!0)},null,8,["title"]),(0,i.Wm)((0,o.SU)(a.ZP),{show:u.value,"onUpdate:show":r[7]||(r[7]=e=>u.value=e),title:(0,o.SU)(t)("title"),options:f.value,description:(0,o.SU)(t)("description"),onSelect:w},null,8,["show","title","options","description"])]),_:1},8,["title"])],64)}}})},24647:function(e,t,n){"use strict";n.d(t,{RQ:function(){return i}});var i=e=>"https://fastly.jsdelivr.net/npm/@vant/assets/".concat(e)},99742:function(e,t,n){"use strict";n.d(t,{bL:function(){return l}});var i=n("63112"),o=n("54499"),l=(0,i.n)(o.ZP);t.ZP=l},6149:function(e,t,n){"use strict";n.d(t,{BC:function(){return l},g2:function(){return o},yj:function(){return a}}),n("56115"),n("59644");var i=n("80681"),o={to:[String,Object],url:String,replace:Boolean};function l(e){var{to:t,url:n,replace:i,$router:o}=e;t&&o?o[i?"replace":"push"](t):n&&(i?location.replace(n):location.href=n)}function a(){var e=(0,i.FN)().proxy;return()=>l(e)}},95786:function(e,t,n){"use strict";n.d(t,{gb:function(){return l}});var i=n("63112"),o=n("2309"),l=(0,i.n)(o.Z);t.ZP=l},92062:function(e,t,n){"use strict";var i=n("63112"),o=n("71904"),l=(0,i.n)(o.Z);t.ZP=l},20897:function(e,t,n){"use strict";n.d(t,{G:function(){return o}});var i=0;function o(e){e?(!i&&document.body.classList.add("van-toast--unclickable"),i++):i&&!--i&&document.body.classList.remove("van-toast--unclickable")}},84285:function(e,t,n){"use strict";n.d(t,{H:function(){return c},o:function(){return r}});var i=n("11848"),o=n("39594"),l=n("12308"),a=n("10023");function r(){var e=(0,i.qj)({show:!1}),t=t=>{e.show=t},n=n=>{(0,l.l7)(e,n,{transitionAppear:!0}),t(!0)},o=()=>t(!1);return(0,a.F)({open:n,close:o,toggle:t}),{open:n,close:o,state:e,toggle:t}}function c(e){var t=(0,o.ri)(e),n=document.createElement("div");return document.body.appendChild(n),{instance:t.mount(n),unmount(){t.unmount(),document.body.removeChild(n)}}}},54499:function(e,t,n){"use strict";n.d(t,{x_:function(){return d}}),n("82116"),n("17989");var i=n("80681"),o=n("62568"),l=n("78335"),a=n("12308"),r=n("6149"),c=n("96528"),[s,u]=(0,o.do)("cell"),d={tag:(0,l.SQ)("div"),icon:String,size:String,title:l.Or,value:l.Or,label:l.Or,center:Boolean,isLink:Boolean,border:l.J5,iconPrefix:String,valueClass:l.Vg,labelClass:l.Vg,titleClass:l.Vg,titleStyle:null,arrowDirection:String,required:{type:[Boolean,String],default:null},clickable:{type:Boolean,default:null}},m=(0,a.l7)({},d,r.g2);t.ZP=(0,i.aZ)({name:s,props:m,setup(e,t){var{slots:n}=t,o=(0,r.yj)(),l=()=>{if(n.label||(0,a.Xq)(e.label))return(0,i.Wm)("div",{class:[u("label"),e.labelClass]},[n.label?n.label():e.label])},s=()=>{if(n.title||(0,a.Xq)(e.title)){var t,o=null===(t=n.title)||void 0===t?void 0:t.call(n);if(!Array.isArray(o)||0!==o.length)return(0,i.Wm)("div",{class:[u("title"),e.titleClass],style:e.titleStyle},[o||(0,i.Wm)("span",null,[e.title]),l()])}},d=()=>{var t=n.value||n.default;if(t||(0,a.Xq)(e.value))return(0,i.Wm)("div",{class:[u("value"),e.valueClass]},[t?t():(0,i.Wm)("span",null,[e.value])])},m=()=>n.icon?n.icon():e.icon?(0,i.Wm)(c.JO,{name:e.icon,class:u("left-icon"),classPrefix:e.iconPrefix},null):void 0,p=()=>{if(n["right-icon"])return n["right-icon"]();if(e.isLink){var t=e.arrowDirection&&"right"!==e.arrowDirection?"arrow-".concat(e.arrowDirection):"arrow";return(0,i.Wm)(c.JO,{name:t,class:u("right-icon")},null)}};return()=>{var t,{tag:l,size:a,center:r,border:c,isLink:v,required:h}=e,f=null!==(t=e.clickable)&&void 0!==t?t:v,w={center:r,required:!!h,clickable:f,borderless:!c};return a&&(w[a]=!!a),(0,i.Wm)(l,{class:u(w),role:f?"button":void 0,tabindex:f?0:void 0,onClick:o},{default:()=>{var e;return[m(),s(),d(),p(),null===(e=n.extra)||void 0===e?void 0:e.call(n)]}})}}})},2309:function(e,t,n){"use strict";n("82116"),n("17989"),n("66786"),n("14529");var i=n("80681"),o=n("62568"),l=n("78335"),a=n("12308"),r=n("20358"),[c,s]=(0,o.do)("loading"),u=Array(12).fill(null).map((e,t)=>(0,i.Wm)("i",{class:s("line",String(t+1))},null)),d=(0,i.Wm)("svg",{class:s("circular"),viewBox:"25 25 50 50"},[(0,i.Wm)("circle",{cx:"50",cy:"50",r:"20",fill:"none"},null)]),m={size:l.Or,type:(0,l.SQ)("circular"),color:String,vertical:Boolean,textSize:l.Or,textColor:String};t.Z=(0,i.aZ)({name:c,props:m,setup(e,t){var{slots:n}=t,o=(0,i.Fl)(()=>(0,a.l7)({color:e.color},(0,r.Xn)(e.size))),l=()=>{var t="spinner"===e.type?u:d;return(0,i.Wm)("span",{class:s("spinner",e.type),style:o.value},[n.icon?n.icon():t])},c=()=>{if(n.default){var t;return(0,i.Wm)("span",{class:s("text"),style:{fontSize:(0,r.Nn)(e.textSize),color:null!==(t=e.textColor)&&void 0!==t?t:e.color}},[n.default()])}};return()=>{var{type:t,vertical:n}=e;return(0,i.Wm)("div",{class:s([t,{vertical:n}]),"aria-live":"polite","aria-busy":!0},[l(),c()])}}})},71904:function(e,t,n){"use strict";n("24660"),n("82116"),n("17989"),n("86795"),n("66786"),n("14529");var i=n("80681"),o=n("62568"),l=n("12308"),a=n("78335"),r=n("8051"),c=n("3558"),s=n("96528"),u=n("97760"),d=e=>null==e?void 0:e.includes("/"),m=[...c.m,"round","closeOnPopstate","safeAreaInsetBottom"],p={qq:"qq",link:"link-o",weibo:"weibo",qrcode:"qr",poster:"photo-o",wechat:"wechat","weapp-qrcode":"miniprogram-o","wechat-moments":"wechat-moments"},[v,h,f]=(0,o.do)("share-sheet"),w=(0,l.l7)({},c.W,{title:String,round:a.J5,options:(0,a.Ce)(),cancelText:String,description:String,closeOnPopstate:a.J5,safeAreaInsetBottom:a.J5});t.Z=(0,i.aZ)({name:v,props:w,emits:["cancel","select","update:show"],setup(e,t){var{emit:n,slots:o}=t,a=e=>n("update:show",e),c=()=>{a(!1),n("cancel")},v=(e,t)=>n("select",e,t),w=()=>{var t=o.title?o.title():e.title,n=o.description?o.description():e.description;if(t||n)return(0,i.Wm)("div",{class:h("header")},[t&&(0,i.Wm)("h2",{class:h("title")},[t]),n&&(0,i.Wm)("span",{class:h("description")},[n])])},S=e=>d(e)?(0,i.Wm)("img",{src:e,class:h("image-icon")},null):(0,i.Wm)("div",{class:h("icon",[e])},[(0,i.Wm)(s.JO,{name:p[e]||e},null)]),g=(e,t)=>{var{name:n,icon:o,className:l,description:a}=e;return(0,i.Wm)("div",{role:"button",tabindex:0,class:[h("option"),l,r.e9],onClick:()=>v(e,t)},[S(o),n&&(0,i.Wm)("span",{class:h("name")},[n]),a&&(0,i.Wm)("span",{class:h("option-description")},[a])])},b=(e,t)=>(0,i.Wm)("div",{class:h("options",{border:t})},[e.map(g)]),y=()=>{var{options:t}=e;return Array.isArray(t[0])?t.map((e,t)=>b(e,0!==t)):b(t)},k=()=>{var t,n=null!==(t=e.cancelText)&&void 0!==t?t:f("cancel");if(o.cancel||n)return(0,i.Wm)("button",{type:"button",class:h("cancel"),onClick:c},[o.cancel?o.cancel():n])};return()=>(0,i.Wm)(u.GI,(0,i.dG)({class:h(),position:"bottom","onUpdate:show":a},(0,l.ei)(e,m)),{default:()=>[w(),y(),k()]})}})},21083:function(e,t,n){"use strict";n("82116"),n("17989");var i=n("80681"),o=n("62568"),l=n("78335"),a=n("12308"),r=n("20897"),c=n("96528"),s=n("97760"),u=n("95786"),[d,m]=(0,o.do)("toast"),p=["show","overlay","teleport","transition","overlayClass","overlayStyle","closeOnClickOverlay","zIndex"],v={icon:String,show:Boolean,type:(0,l.SQ)("text"),overlay:Boolean,message:l.Or,iconSize:l.Or,duration:(0,l.qM)(2e3),position:(0,l.SQ)("middle"),teleport:[String,Object],wordBreak:String,className:l.Vg,iconPrefix:String,transition:(0,l.SQ)("van-fade"),loadingType:String,forbidClick:Boolean,overlayClass:l.Vg,overlayStyle:Object,closeOnClick:Boolean,closeOnClickOverlay:Boolean,zIndex:l.Or};t.Z=(0,i.aZ)({name:d,props:v,emits:["update:show"],setup(e,t){var n,{emit:o,slots:l}=t,d=!1,v=()=>{var t=e.show&&e.forbidClick;d!==t&&(d=t,(0,r.G)(d))},h=e=>o("update:show",e),f=()=>{e.closeOnClick&&h(!1)},w=()=>clearTimeout(n),S=()=>{var{icon:t,type:n,iconSize:o,iconPrefix:l,loadingType:a}=e;return t||"success"===n||"fail"===n?(0,i.Wm)(c.JO,{name:t||n,size:o,class:m("icon"),classPrefix:l},null):"loading"===n?(0,i.Wm)(u.gb,{class:m("loading"),size:o,type:a},null):void 0},g=()=>{var{type:t,message:n}=e;return l.message?(0,i.Wm)("div",{class:m("text")},[l.message()]):(0,a.Xq)(n)&&""!==n?"html"===t?(0,i.Wm)("div",{key:0,class:m("text"),innerHTML:String(n)},null):(0,i.Wm)("div",{class:m("text")},[n]):void 0};return(0,i.YP)(()=>[e.show,e.forbidClick],v),(0,i.YP)(()=>[e.show,e.type,e.message,e.duration],()=>{w(),e.show&&e.duration>0&&(n=setTimeout(()=>{h(!1)},e.duration))}),(0,i.bv)(v),(0,i.Ah)(v),()=>(0,i.Wm)(s.GI,(0,i.dG)({class:[m([e.position,"normal"===e.wordBreak?"break-normal":e.wordBreak,{[e.type]:!e.icon}]),e.className],lockScroll:!1,onClick:f,onClosed:w,"onUpdate:show":h},(0,a.ei)(e,p)),{default:()=>[S(),g()]})}})},13118:function(e,t,n){"use strict";n.d(t,{CF:function(){return m},LJ:function(){return f},XA:function(){return h},di:function(){return v},yg:function(){return w}}),n("24836"),n("41712"),n("80855"),n("10502"),n("7978"),n("66746"),n("17530"),n("87604"),n("57024"),n("22175"),n("85322"),n("47897"),n("48943"),n("43356"),n("82116"),n("17989"),n("96245"),n("37232"),n("70629"),n("61557"),n("31564"),n("8649");var i=n("80681"),o=n("11848"),l=n("12308"),a=n("84285"),r=n("21083"),c=[],s=(0,l.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,l.Kn)(e)?e:{message:e}}function m(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!l._f)return{};var t=function(){if(!c.length){var e=function(){var{instance:e,unmount:t}=(0,a.H)({setup(){var e=(0,o.iH)(""),{open:t,state:n,close:l,toggle:c}=(0,a.o)(),s=()=>{};return(0,i.YP)(e,e=>{n.message=e}),(0,i.FN)().render=()=>(0,i.Wm)(r.Z,(0,i.dG)(n,{onClosed:s,"onUpdate:show":c}),null),{open:t,close:l,message:e}}});return e}();c.push(e)}return c[c.length-1]}(),n=d(e);return t.open((0,l.l7)({},s,u.get(n.type||s.type),n)),t}var p=e=>t=>m((0,l.l7)({type:e},d(t))),v=p("loading"),h=p("success"),f=p("fail"),w=e=>{if(c.length){if(e)c.forEach(e=>{e.close()}),c=[];else{var t;c[0].close()}}}}}]);