mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-06 03:57:59 +08:00
2 lines
14 KiB
JavaScript
2 lines
14 KiB
JavaScript
/*! For license information please see 1425.6e7abd31.js.LICENSE.txt */
|
|
(self.webpackChunk=self.webpackChunk||[]).push([["1425"],{40276:function(t,e,i){"use strict";let l=i("91374").Z;e.Z=l},55109:function(t,e,i){"use strict";i.r(e);var l=i("73064");i("12764");let a=l.Z;e.default=a},91374:function(t,e,i){"use strict";var l=i("80681"),a=i("11848"),n=i("57122"),o=i("19924"),r=i("44616"),u=i("54369");e.Z=(0,l.aZ)({__name:"Shrink",setup(t){var e=(0,u.q)({"zh-CN":{tab:"\u6807\u7B7E ",shrink:"\u6536\u7F29\u5E03\u5C40"},"en-US":{tab:"Tab ",shrink:"Shrink"}}),i=[1,2,3,4],c=(0,a.iH)(0),s=(0,a.iH)(0);return(t,u)=>{var d=(0,l.up)("demo-block");return(0,l.wg)(),(0,l.j4)(d,{title:(0,a.SU)(e)("shrink")},{default:(0,l.w5)(()=>[(0,l.Wm)((0,a.SU)(o.ZP),{active:c.value,"onUpdate:active":u[0]||(u[0]=t=>c.value=t),shrink:""},{default:(0,l.w5)(()=>[((0,l.wg)(),(0,l.iD)(l.HY,null,(0,l.Ko)(i,t=>(0,l.Wm)((0,a.SU)(r.ZP),{title:(0,a.SU)(e)("tab")+t,key:t},{default:(0,l.w5)(()=>[(0,l.Uk)((0,n.zw)((0,a.SU)(e)("content"))+" "+(0,n.zw)(t),1)]),_:2},1032,["title"])),64))]),_:1},8,["active"]),(0,l.Wm)((0,a.SU)(o.ZP),{active:s.value,"onUpdate:active":u[1]||(u[1]=t=>s.value=t),type:"card",shrink:"",style:{"margin-top":"var(--van-padding-lg)"}},{default:(0,l.w5)(()=>[((0,l.wg)(),(0,l.iD)(l.HY,null,(0,l.Ko)(i,t=>(0,l.Wm)((0,a.SU)(r.ZP),{title:(0,a.SU)(e)("tab")+t,key:t},{default:(0,l.w5)(()=>[(0,l.Uk)((0,n.zw)((0,a.SU)(e)("content"))+" "+(0,n.zw)(t),1)]),_:2},1032,["title"])),64))]),_:1},8,["active"])]),_:1},8,["title"])}}})},73064:function(t,e,i){"use strict";i("40944");var l=i("80681"),a=i("11848"),n=i("57122"),o=i("19924"),r=i("44616"),u=i("96528"),c=i("54369"),s=i("13118"),d=i("40276");e.Z=(0,l.aZ)({__name:"index",setup(t){var e=(0,c.q)({"zh-CN":{tab:"\u6807\u7B7E ",title2:"\u6807\u7B7E\u680F\u6EDA\u52A8",title3:"\u7981\u7528\u6807\u7B7E",title4:"\u6837\u5F0F\u98CE\u683C",title5:"\u70B9\u51FB\u4E8B\u4EF6",title6:"\u7C98\u6027\u5E03\u5C40",title7:"\u81EA\u5B9A\u4E49\u6807\u7B7E",title8:"\u5207\u6362\u52A8\u753B",title9:"\u6ED1\u52A8\u5207\u6362",title10:"\u6EDA\u52A8\u5BFC\u822A",disabled:" \u5DF2\u88AB\u7981\u7528",matchByName:"\u901A\u8FC7\u540D\u79F0\u5339\u914D",beforeChange:"\u5F02\u6B65\u5207\u6362"},"en-US":{tab:"Tab ",content:"content of tab",title2:"Swipe Tabs",title3:"Disabled Tab",title4:"Card Style",title5:"Click Event",title6:"Sticky",title7:"Custom Tab",title8:"Switch Animation",title9:"Swipeable",title10:"Scrollspy",disabled:" is disabled",matchByName:"Match By Name",beforeChange:"Before Change"}}),i=(0,a.iH)(0),v=(0,a.iH)(0),w=(0,a.iH)(0),U=(0,a.iH)(0),m=(0,a.iH)(0),S=(0,a.iH)(0),f=(0,a.iH)(0),p=(0,a.iH)(0),k=(0,a.iH)(0),y=(0,a.iH)(0),b=(0,a.iH)(0),W=(0,a.iH)("b"),g=[1,2,3,4],_=t=>{var{title:e}=t;(0,s.CF)(e)},Z=t=>1!==t&&new Promise(e=>{setTimeout(()=>e(3!==t),1e3)});return(t,c)=>{var s=(0,l.up)("demo-block");return(0,l.wg)(),(0,l.iD)(l.HY,null,[(0,l.Wm)(s,{title:(0,a.SU)(e)("basicUsage")},{default:(0,l.w5)(()=>[(0,l.Wm)((0,a.SU)(o.ZP),{active:i.value,"onUpdate:active":c[0]||(c[0]=t=>i.value=t)},{default:(0,l.w5)(()=>[((0,l.wg)(),(0,l.iD)(l.HY,null,(0,l.Ko)(g,t=>(0,l.Wm)((0,a.SU)(r.ZP),{title:(0,a.SU)(e)("tab")+t,key:t},{default:(0,l.w5)(()=>[(0,l.Uk)((0,n.zw)((0,a.SU)(e)("content"))+" "+(0,n.zw)(t),1)]),_:2},1032,["title"])),64))]),_:1},8,["active"])]),_:1},8,["title"]),(0,l.Wm)(s,{title:(0,a.SU)(e)("matchByName")},{default:(0,l.w5)(()=>[(0,l.Wm)((0,a.SU)(o.ZP),{active:W.value,"onUpdate:active":c[1]||(c[1]=t=>W.value=t)},{default:(0,l.w5)(()=>[(0,l.Wm)((0,a.SU)(r.ZP),{name:"a",title:(0,a.SU)(e)("tab")+1},{default:(0,l.w5)(()=>[(0,l.Uk)((0,n.zw)((0,a.SU)(e)("content"))+" 1 ",1)]),_:1},8,["title"]),(0,l.Wm)((0,a.SU)(r.ZP),{name:"b",title:(0,a.SU)(e)("tab")+2},{default:(0,l.w5)(()=>[(0,l.Uk)((0,n.zw)((0,a.SU)(e)("content"))+" 2 ",1)]),_:1},8,["title"]),(0,l.Wm)((0,a.SU)(r.ZP),{name:"c",title:(0,a.SU)(e)("tab")+3},{default:(0,l.w5)(()=>[(0,l.Uk)((0,n.zw)((0,a.SU)(e)("content"))+" 3 ",1)]),_:1},8,["title"])]),_:1},8,["active"])]),_:1},8,["title"]),(0,l.Wm)(s,{title:(0,a.SU)(e)("title2")},{default:(0,l.w5)(()=>[(0,l.Wm)((0,a.SU)(o.ZP),{active:v.value,"onUpdate:active":c[2]||(c[2]=t=>v.value=t)},{default:(0,l.w5)(()=>[((0,l.wg)(),(0,l.iD)(l.HY,null,(0,l.Ko)(8,t=>(0,l.Wm)((0,a.SU)(r.ZP),{title:(0,a.SU)(e)("tab")+t,key:t},{default:(0,l.w5)(()=>[(0,l.Uk)((0,n.zw)((0,a.SU)(e)("content"))+" "+(0,n.zw)(t),1)]),_:2},1032,["title"])),64))]),_:1},8,["active"])]),_:1},8,["title"]),(0,l.Wm)(s,{title:(0,a.SU)(e)("title3")},{default:(0,l.w5)(()=>[(0,l.Wm)((0,a.SU)(o.ZP),{active:w.value,"onUpdate:active":c[3]||(c[3]=t=>w.value=t)},{default:(0,l.w5)(()=>[((0,l.wg)(),(0,l.iD)(l.HY,null,(0,l.Ko)(3,t=>(0,l.Wm)((0,a.SU)(r.ZP),{title:(0,a.SU)(e)("tab")+t,disabled:2===t,key:t},{default:(0,l.w5)(()=>[(0,l.Uk)((0,n.zw)((0,a.SU)(e)("content"))+" "+(0,n.zw)(t),1)]),_:2},1032,["title","disabled"])),64))]),_:1},8,["active"])]),_:1},8,["title"]),(0,l.Wm)(s,{title:(0,a.SU)(e)("title4")},{default:(0,l.w5)(()=>[(0,l.Wm)((0,a.SU)(o.ZP),{active:U.value,"onUpdate:active":c[4]||(c[4]=t=>U.value=t),type:"card"},{default:(0,l.w5)(()=>[((0,l.wg)(),(0,l.iD)(l.HY,null,(0,l.Ko)(3,t=>(0,l.Wm)((0,a.SU)(r.ZP),{title:(0,a.SU)(e)("tab")+t,key:t},{default:(0,l.w5)(()=>[(0,l.Uk)((0,n.zw)((0,a.SU)(e)("content"))+" "+(0,n.zw)(t),1)]),_:2},1032,["title"])),64))]),_:1},8,["active"])]),_:1},8,["title"]),(0,l.Wm)(s,{title:(0,a.SU)(e)("title5")},{default:(0,l.w5)(()=>[(0,l.Wm)((0,a.SU)(o.ZP),{active:m.value,"onUpdate:active":c[5]||(c[5]=t=>m.value=t),onClickTab:_},{default:(0,l.w5)(()=>[((0,l.wg)(),(0,l.iD)(l.HY,null,(0,l.Ko)(2,t=>(0,l.Wm)((0,a.SU)(r.ZP),{title:(0,a.SU)(e)("tab")+t,key:t},{default:(0,l.w5)(()=>[(0,l.Uk)((0,n.zw)((0,a.SU)(e)("content"))+" "+(0,n.zw)(t),1)]),_:2},1032,["title"])),64))]),_:1},8,["active"])]),_:1},8,["title"]),(0,l.Wm)(s,{title:(0,a.SU)(e)("title6")},{default:(0,l.w5)(()=>[(0,l.Wm)((0,a.SU)(o.ZP),{active:S.value,"onUpdate:active":c[6]||(c[6]=t=>S.value=t),sticky:""},{default:(0,l.w5)(()=>[((0,l.wg)(),(0,l.iD)(l.HY,null,(0,l.Ko)(g,t=>(0,l.Wm)((0,a.SU)(r.ZP),{title:(0,a.SU)(e)("tab")+t,key:t},{default:(0,l.w5)(()=>[(0,l.Uk)((0,n.zw)((0,a.SU)(e)("content"))+" "+(0,n.zw)(t),1)]),_:2},1032,["title"])),64))]),_:1},8,["active"])]),_:1},8,["title"]),(0,l.Wm)(d.Z),(0,l.Wm)(s,{title:(0,a.SU)(e)("title7")},{default:(0,l.w5)(()=>[(0,l.Wm)((0,a.SU)(o.ZP),{active:f.value,"onUpdate:active":c[7]||(c[7]=t=>f.value=t)},{default:(0,l.w5)(()=>[((0,l.wg)(),(0,l.iD)(l.HY,null,(0,l.Ko)(2,t=>(0,l.Wm)((0,a.SU)(r.ZP),{key:t},{title:(0,l.w5)(()=>[(0,l.Wm)((0,a.SU)(u.ZP),{name:"more-o"}),(0,l.Uk)((0,n.zw)((0,a.SU)(e)("tab")),1)]),default:(0,l.w5)(()=>[(0,l.Uk)(" "+(0,n.zw)((0,a.SU)(e)("content"))+" "+(0,n.zw)(t),1)]),_:2},1024)),64))]),_:1},8,["active"])]),_:1},8,["title"]),(0,l.Wm)(s,{title:(0,a.SU)(e)("title8")},{default:(0,l.w5)(()=>[(0,l.Wm)((0,a.SU)(o.ZP),{active:p.value,"onUpdate:active":c[8]||(c[8]=t=>p.value=t),animated:""},{default:(0,l.w5)(()=>[((0,l.wg)(),(0,l.iD)(l.HY,null,(0,l.Ko)(g,t=>(0,l.Wm)((0,a.SU)(r.ZP),{title:(0,a.SU)(e)("tab")+t,key:t},{default:(0,l.w5)(()=>[(0,l.Uk)((0,n.zw)((0,a.SU)(e)("content"))+" "+(0,n.zw)(t),1)]),_:2},1032,["title"])),64))]),_:1},8,["active"])]),_:1},8,["title"]),(0,l.Wm)(s,{title:(0,a.SU)(e)("title9")},{default:(0,l.w5)(()=>[(0,l.Wm)((0,a.SU)(o.ZP),{active:k.value,"onUpdate:active":c[9]||(c[9]=t=>k.value=t),swipeable:""},{default:(0,l.w5)(()=>[((0,l.wg)(),(0,l.iD)(l.HY,null,(0,l.Ko)(g,t=>(0,l.Wm)((0,a.SU)(r.ZP),{title:(0,a.SU)(e)("tab")+t,key:t},{default:(0,l.w5)(()=>[(0,l.Uk)((0,n.zw)((0,a.SU)(e)("content"))+" "+(0,n.zw)(t),1)]),_:2},1032,["title"])),64))]),_:1},8,["active"])]),_:1},8,["title"]),(0,l.Wm)(s,{title:(0,a.SU)(e)("title10")},{default:(0,l.w5)(()=>[(0,l.Wm)((0,a.SU)(o.ZP),{active:y.value,"onUpdate:active":c[10]||(c[10]=t=>y.value=t),scrollspy:"",sticky:""},{default:(0,l.w5)(()=>[((0,l.wg)(),(0,l.iD)(l.HY,null,(0,l.Ko)(8,t=>(0,l.Wm)((0,a.SU)(r.ZP),{title:(0,a.SU)(e)("tab")+t,key:t},{default:(0,l.w5)(()=>[(0,l.Uk)((0,n.zw)((0,a.SU)(e)("content"))+" "+(0,n.zw)(t),1)]),_:2},1032,["title"])),64))]),_:1},8,["active"])]),_:1},8,["title"]),(0,l.Wm)(s,{title:(0,a.SU)(e)("beforeChange")},{default:(0,l.w5)(()=>[(0,l.Wm)((0,a.SU)(o.ZP),{active:b.value,"onUpdate:active":c[11]||(c[11]=t=>b.value=t),"before-change":Z},{default:(0,l.w5)(()=>[((0,l.wg)(),(0,l.iD)(l.HY,null,(0,l.Ko)(4,t=>(0,l.Wm)((0,a.SU)(r.ZP),{title:(0,a.SU)(e)("tab")+t,key:t},{default:(0,l.w5)(()=>[(0,l.Uk)((0,n.zw)((0,a.SU)(e)("content"))+" "+(0,n.zw)(t),1)]),_:2},1032,["title"])),64))]),_:1},8,["active"])]),_:1},8,["title"])],64)}}})},95786:function(t,e,i){"use strict";i.d(e,{gb:function(){return n}});var l=i("63112"),a=i("2309"),n=(0,l.n)(a.Z);e.ZP=n},20897:function(t,e,i){"use strict";i.d(e,{G:function(){return a}});var l=0;function a(t){t?(!l&&document.body.classList.add("van-toast--unclickable"),l++):l&&!--l&&document.body.classList.remove("van-toast--unclickable")}},84285:function(t,e,i){"use strict";i.d(e,{H:function(){return u},o:function(){return r}});var l=i("11848"),a=i("39594"),n=i("12308"),o=i("10023");function r(){var t=(0,l.qj)({show:!1}),e=e=>{t.show=e},i=i=>{(0,n.l7)(t,i,{transitionAppear:!0}),e(!0)},a=()=>e(!1);return(0,o.F)({open:i,close:a,toggle:e}),{open:i,close:a,state:t,toggle:e}}function u(t){var e=(0,a.ri)(t),i=document.createElement("div");return document.body.appendChild(i),{instance:e.mount(i),unmount(){e.unmount(),document.body.removeChild(i)}}}},2309:function(t,e,i){"use strict";i("82116"),i("17989"),i("66786"),i("14529");var l=i("80681"),a=i("62568"),n=i("78335"),o=i("12308"),r=i("20358"),[u,c]=(0,a.do)("loading"),s=Array(12).fill(null).map((t,e)=>(0,l.Wm)("i",{class:c("line",String(e+1))},null)),d=(0,l.Wm)("svg",{class:c("circular"),viewBox:"25 25 50 50"},[(0,l.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};e.Z=(0,l.aZ)({name:u,props:v,setup(t,e){var{slots:i}=e,a=(0,l.Fl)(()=>(0,o.l7)({color:t.color},(0,r.Xn)(t.size))),n=()=>{var e="spinner"===t.type?s:d;return(0,l.Wm)("span",{class:c("spinner",t.type),style:a.value},[i.icon?i.icon():e])},u=()=>{if(i.default){var e;return(0,l.Wm)("span",{class:c("text"),style:{fontSize:(0,r.Nn)(t.textSize),color:null!==(e=t.textColor)&&void 0!==e?e:t.color}},[i.default()])}};return()=>{var{type:e,vertical:i}=t;return(0,l.Wm)("div",{class:c([e,{vertical:i}]),"aria-live":"polite","aria-busy":!0},[n(),u()])}}})},21083:function(t,e,i){"use strict";i("82116"),i("17989");var l=i("80681"),a=i("62568"),n=i("78335"),o=i("12308"),r=i("20897"),u=i("96528"),c=i("97760"),s=i("95786"),[d,v]=(0,a.do)("toast"),w=["show","overlay","teleport","transition","overlayClass","overlayStyle","closeOnClickOverlay","zIndex"],U={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};e.Z=(0,l.aZ)({name:d,props:U,emits:["update:show"],setup(t,e){var i,{emit:a,slots:n}=e,d=!1,U=()=>{var e=t.show&&t.forbidClick;d!==e&&(d=e,(0,r.G)(d))},m=t=>a("update:show",t),S=()=>{t.closeOnClick&&m(!1)},f=()=>clearTimeout(i),p=()=>{var{icon:e,type:i,iconSize:a,iconPrefix:n,loadingType:o}=t;return e||"success"===i||"fail"===i?(0,l.Wm)(u.JO,{name:e||i,size:a,class:v("icon"),classPrefix:n},null):"loading"===i?(0,l.Wm)(s.gb,{class:v("loading"),size:a,type:o},null):void 0},k=()=>{var{type:e,message:i}=t;return n.message?(0,l.Wm)("div",{class:v("text")},[n.message()]):(0,o.Xq)(i)&&""!==i?"html"===e?(0,l.Wm)("div",{key:0,class:v("text"),innerHTML:String(i)},null):(0,l.Wm)("div",{class:v("text")},[i]):void 0};return(0,l.YP)(()=>[t.show,t.forbidClick],U),(0,l.YP)(()=>[t.show,t.type,t.message,t.duration],()=>{f(),t.show&&t.duration>0&&(i=setTimeout(()=>{m(!1)},t.duration))}),(0,l.bv)(U),(0,l.Ah)(U),()=>(0,l.Wm)(c.GI,(0,l.dG)({class:[v([t.position,"normal"===t.wordBreak?"break-normal":t.wordBreak,{[t.type]:!t.icon}]),t.className],lockScroll:!1,onClick:S,onClosed:f,"onUpdate:show":m},(0,o.ei)(t,w)),{default:()=>[p(),k()]})}})},13118:function(t,e,i){"use strict";i.d(e,{CF:function(){return v},LJ:function(){return S},XA:function(){return m},di:function(){return U},yg:function(){return f}}),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 l=i("80681"),a=i("11848"),n=i("12308"),o=i("84285"),r=i("21083"),u=[],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}),s=new Map;function d(t){return(0,n.Kn)(t)?t:{message:t}}function v(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!n._f)return{};var e=function(){if(!u.length){var t=function(){var{instance:t,unmount:e}=(0,o.H)({setup(){var t=(0,a.iH)(""),{open:e,state:i,close:n,toggle:u}=(0,o.o)(),c=()=>{};return(0,l.YP)(t,t=>{i.message=t}),(0,l.FN)().render=()=>(0,l.Wm)(r.Z,(0,l.dG)(i,{onClosed:c,"onUpdate:show":u}),null),{open:e,close:n,message:t}}});return t}();u.push(t)}return u[u.length-1]}(),i=d(t);return e.open((0,n.l7)({},c,s.get(i.type||c.type),i)),e}var w=t=>e=>v((0,n.l7)({type:t},d(e))),U=w("loading"),m=w("success"),S=w("fail"),f=t=>{if(u.length){if(t)u.forEach(t=>{t.close()}),u=[];else{var e;u[0].close()}}}},12764:function(t,e,i){"use strict";i.r(t.exports={})},41093:function(t,e,i){"use strict";i.r(t.exports={})}}]); |