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

2 lines
9.4 KiB
JavaScript

/*! For license information please see 5271.59d24689.js.LICENSE.txt */
(self.webpackChunk=self.webpackChunk||[]).push([["5271"],{68098:function(e,l,o){"use strict";o.r(l);let n=o("81431").Z;l.default=n},81431:function(e,l,o){"use strict";var n=o("80681"),t=o("11848"),a=o("57122"),r=o("50461"),i=o("54369"),c=o("13118"),u={action:"/"};l.Z=(0,n.aZ)({__name:"index",setup(e){var l=(0,i.q)({"zh-CN":{label:"\u5730\u5740",disabled:"\u7981\u7528\u641C\u7D22\u6846",inputAlign:"\u641C\u7D22\u6846\u5185\u5BB9\u5BF9\u9F50",background:"\u81EA\u5B9A\u4E49\u80CC\u666F\u8272",placeholder:"\u8BF7\u8F93\u5165\u641C\u7D22\u5173\u952E\u8BCD",customButton:"\u81EA\u5B9A\u4E49\u6309\u94AE",listenToEvents:"\u4E8B\u4EF6\u76D1\u542C"},"en-US":{label:"Address",disabled:"Disabled",inputAlign:"Input Align",background:"Custom Background Color",placeholder:"Placeholder",customButton:"Custom Action Button",listenToEvents:"Listen to Events"}}),o=(0,t.iH)(""),s=(0,t.iH)(""),d=(0,t.iH)(""),v=(0,t.iH)(""),p=(0,t.iH)(""),m=(0,t.iH)(""),f=e=>(0,c.CF)(e),h=()=>(0,c.CF)(l("cancel")),b=()=>(0,c.CF)(m.value);return(e,i)=>{var c=(0,n.up)("demo-block");return(0,n.wg)(),(0,n.iD)(n.HY,null,[(0,n.Wm)(c,{title:(0,t.SU)(l)("basicUsage")},{default:(0,n.w5)(()=>[(0,n.Wm)((0,t.SU)(r.ZP),{modelValue:o.value,"onUpdate:modelValue":i[0]||(i[0]=e=>o.value=e),placeholder:(0,t.SU)(l)("placeholder")},null,8,["modelValue","placeholder"])]),_:1},8,["title"]),(0,n.Wm)(c,{title:(0,t.SU)(l)("listenToEvents")},{default:(0,n.w5)(()=>[(0,n._)("form",u,[(0,n.Wm)((0,t.SU)(r.ZP),{modelValue:p.value,"onUpdate:modelValue":i[1]||(i[1]=e=>p.value=e),placeholder:(0,t.SU)(l)("placeholder"),"show-action":"",onSearch:f,onCancel:h},null,8,["modelValue","placeholder"])])]),_:1},8,["title"]),(0,n.Wm)(c,{title:(0,t.SU)(l)("inputAlign")},{default:(0,n.w5)(()=>[(0,n.Wm)((0,t.SU)(r.ZP),{modelValue:v.value,"onUpdate:modelValue":i[2]||(i[2]=e=>v.value=e),placeholder:(0,t.SU)(l)("placeholder"),"input-align":"center"},null,8,["modelValue","placeholder"])]),_:1},8,["title"]),(0,n.Wm)(c,{title:(0,t.SU)(l)("disabled")},{default:(0,n.w5)(()=>[(0,n.Wm)((0,t.SU)(r.ZP),{modelValue:d.value,"onUpdate:modelValue":i[3]||(i[3]=e=>d.value=e),placeholder:(0,t.SU)(l)("placeholder"),disabled:""},null,8,["modelValue","placeholder"])]),_:1},8,["title"]),(0,n.Wm)(c,{title:(0,t.SU)(l)("background")},{default:(0,n.w5)(()=>[(0,n.Wm)((0,t.SU)(r.ZP),{modelValue:s.value,"onUpdate:modelValue":i[4]||(i[4]=e=>s.value=e),placeholder:(0,t.SU)(l)("placeholder"),shape:"round",background:"#4fc08d"},null,8,["modelValue","placeholder"])]),_:1},8,["title"]),(0,n.Wm)(c,{title:(0,t.SU)(l)("customButton")},{default:(0,n.w5)(()=>[(0,n.Wm)((0,t.SU)(r.ZP),{modelValue:m.value,"onUpdate:modelValue":i[5]||(i[5]=e=>m.value=e),"show-action":"",label:(0,t.SU)(l)("label"),placeholder:(0,t.SU)(l)("placeholder"),onSearch:f},{action:(0,n.w5)(()=>[(0,n._)("div",{onClick:b},(0,a.zw)((0,t.SU)(l)("search")),1)]),_:1},8,["modelValue","label","placeholder"])]),_:1},8,["title"])],64)}}})},46267:function(e,l,o){"use strict";o.d(l,{M:function(){return a}});var n=o("80681"),t=0;function a(){var e=(0,n.FN)(),{name:l="unknown"}=(null==e?void 0:e.type)||{};return"".concat(l,"-").concat(++t)}},6149:function(e,l,o){"use strict";o.d(l,{BC:function(){return a},g2:function(){return t},yj:function(){return r}}),o("56115"),o("59644");var n=o("80681"),t={to:[String,Object],url:String,replace:Boolean};function a(e){var{to:l,url:o,replace:n,$router:t}=e;l&&t?t[n?"replace":"push"](l):o&&(n?location.replace(o):location.href=o)}function r(){var e=(0,n.FN)().proxy;return()=>a(e)}},50461:function(e,l,o){"use strict";var n=o("63112"),t=o("45433"),a=(0,n.n)(t.Z);l.ZP=a},20897:function(e,l,o){"use strict";o.d(l,{G:function(){return t}});var n=0;function t(e){e?(!n&&document.body.classList.add("van-toast--unclickable"),n++):n&&!--n&&document.body.classList.remove("van-toast--unclickable")}},84285:function(e,l,o){"use strict";o.d(l,{H:function(){return c},o:function(){return i}});var n=o("11848"),t=o("39594"),a=o("12308"),r=o("10023");function i(){var e=(0,n.qj)({show:!1}),l=l=>{e.show=l},o=o=>{(0,a.l7)(e,o,{transitionAppear:!0}),l(!0)},t=()=>l(!1);return(0,r.F)({open:o,close:t,toggle:l}),{open:o,close:t,state:e,toggle:l}}function c(e){var l=(0,t.ri)(e),o=document.createElement("div");return document.body.appendChild(o),{instance:l.mount(o),unmount(){l.unmount(),document.body.removeChild(o)}}}},45433:function(e,l,o){"use strict";o("82116"),o("17989");var n=o("80681"),t=o("11848"),a=o("62568"),r=o("12308"),i=o("78335"),c=o("82210"),u=o("15489"),s=o("46267"),d=o("10023"),v=o("51041"),[p,m,f]=(0,a.do)("search"),h=(0,r.l7)({},u.Mv,{label:String,shape:(0,i.SQ)("square"),leftIcon:(0,i.SQ)("search"),clearable:i.J5,actionText:String,background:String,showAction:Boolean});l.Z=(0,n.aZ)({name:p,props:h,emits:["blur","focus","clear","search","cancel","clickInput","clickLeftIcon","clickRightIcon","update:modelValue"],setup(e,l){var{emit:o,slots:a,attrs:i}=l,p=(0,s.M)(),h=(0,t.iH)(),b=()=>{!a.action&&(o("update:modelValue",""),o("cancel"))},g=l=>{13===l.keyCode&&((0,c.PF)(l),o("search",e.modelValue))},k=()=>e.id||"".concat(p,"-input"),S=()=>{if(a.label||e.label)return(0,n.Wm)("label",{class:m("label"),for:k()},[a.label?a.label():e.label])},y=()=>{if(e.showAction){var l=e.actionText||f("cancel");return(0,n.Wm)("div",{class:m("action"),role:"button",tabindex:0,onClick:b},[a.action?a.action():l])}},C=e=>o("blur",e),w=e=>o("focus",e),U=e=>o("clear",e),V=e=>o("clickInput",e),W=e=>o("clickLeftIcon",e),O=e=>o("clickRightIcon",e),B=Object.keys(u.Mv),Z=()=>{var l=(0,r.l7)({},i,(0,r.ei)(e,B),{id:k()});return(0,n.Wm)(v.gN,(0,n.dG)({ref:h,type:"search",class:m("field",{"with-message":l.errorMessage}),border:!1,onBlur:C,onFocus:w,onClear:U,onKeypress:g,onClickInput:V,onClickLeftIcon:W,onClickRightIcon:O,"onUpdate:modelValue":e=>o("update:modelValue",e)},l),(0,r.ei)(a,["left-icon","right-icon"]))};return(0,d.F)({focus:()=>{var e;return null===(e=h.value)||void 0===e?void 0:e.focus()},blur:()=>{var e;return null===(e=h.value)||void 0===e?void 0:e.blur()}}),()=>{var l;return(0,n.Wm)("div",{class:m({"show-action":e.showAction}),style:{background:e.background}},[null===(l=a.left)||void 0===l?void 0:l.call(a),(0,n.Wm)("div",{class:m("content",e.shape)},[S(),Z()]),y()])}}})},21083:function(e,l,o){"use strict";o("82116"),o("17989");var n=o("80681"),t=o("62568"),a=o("78335"),r=o("12308"),i=o("20897"),c=o("96528"),u=o("97760"),s=o("95786"),[d,v]=(0,t.do)("toast"),p=["show","overlay","teleport","transition","overlayClass","overlayStyle","closeOnClickOverlay","zIndex"],m={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};l.Z=(0,n.aZ)({name:d,props:m,emits:["update:show"],setup(e,l){var o,{emit:t,slots:a}=l,d=!1,m=()=>{var l=e.show&&e.forbidClick;d!==l&&(d=l,(0,i.G)(d))},f=e=>t("update:show",e),h=()=>{e.closeOnClick&&f(!1)},b=()=>clearTimeout(o),g=()=>{var{icon:l,type:o,iconSize:t,iconPrefix:a,loadingType:r}=e;return l||"success"===o||"fail"===o?(0,n.Wm)(c.JO,{name:l||o,size:t,class:v("icon"),classPrefix:a},null):"loading"===o?(0,n.Wm)(s.gb,{class:v("loading"),size:t,type:r},null):void 0},k=()=>{var{type:l,message:o}=e;return a.message?(0,n.Wm)("div",{class:v("text")},[a.message()]):(0,r.Xq)(o)&&""!==o?"html"===l?(0,n.Wm)("div",{key:0,class:v("text"),innerHTML:String(o)},null):(0,n.Wm)("div",{class:v("text")},[o]):void 0};return(0,n.YP)(()=>[e.show,e.forbidClick],m),(0,n.YP)(()=>[e.show,e.type,e.message,e.duration],()=>{b(),e.show&&e.duration>0&&(o=setTimeout(()=>{f(!1)},e.duration))}),(0,n.bv)(m),(0,n.Ah)(m),()=>(0,n.Wm)(u.GI,(0,n.dG)({class:[v([e.position,"normal"===e.wordBreak?"break-normal":e.wordBreak,{[e.type]:!e.icon}]),e.className],lockScroll:!1,onClick:h,onClosed:b,"onUpdate:show":f},(0,r.ei)(e,p)),{default:()=>[g(),k()]})}})},13118:function(e,l,o){"use strict";o.d(l,{CF:function(){return v},LJ:function(){return h},XA:function(){return f},di:function(){return m},yg:function(){return b}}),o("24836"),o("41712"),o("80855"),o("10502"),o("7978"),o("66746"),o("17530"),o("87604"),o("57024"),o("22175"),o("85322"),o("47897"),o("48943"),o("43356"),o("82116"),o("17989"),o("96245"),o("37232"),o("70629"),o("61557"),o("31564"),o("8649");var n=o("80681"),t=o("11848"),a=o("12308"),r=o("84285"),i=o("21083"),c=[],u=(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}),s=new Map;function d(e){return(0,a.Kn)(e)?e:{message:e}}function v(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!a._f)return{};var l=function(){if(!c.length){var e=function(){var{instance:e,unmount:l}=(0,r.H)({setup(){var e=(0,t.iH)(""),{open:l,state:o,close:a,toggle:c}=(0,r.o)(),u=()=>{};return(0,n.YP)(e,e=>{o.message=e}),(0,n.FN)().render=()=>(0,n.Wm)(i.Z,(0,n.dG)(o,{onClosed:u,"onUpdate:show":c}),null),{open:l,close:a,message:e}}});return e}();c.push(e)}return c[c.length-1]}(),o=d(e);return l.open((0,a.l7)({},u,s.get(o.type||u.type),o)),l}var p=e=>l=>v((0,a.l7)({type:e},d(l))),m=p("loading"),f=p("success"),h=p("fail"),b=e=>{if(c.length){if(e)c.forEach(e=>{e.close()}),c=[];else{var l;c[0].close()}}}}}]);