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 3321.d617da18.js.LICENSE.txt */
|
|
(self.webpackChunk=self.webpackChunk||[]).push([["3321"],{55183:function(t,e,n){"use strict";n.r(e);var r=n("59048");n("85985");let i=r.Z;e.default=i},59048:function(t,e,n){"use strict";var r=n("80681"),i=n("11848"),o=n("57122"),l=n("88466"),a=n("95922"),c=n("99497"),u=n("54369"),s=(0,r._)("p",null,"2016-07-12 12:40",-1),f=(0,r._)("p",null,"2016-07-11 10:00",-1),d=(0,r._)("p",null,"2016-07-10 09:30",-1);e.Z=(0,r.aZ)({__name:"index",setup(t){var e=(0,u.q)({"zh-CN":{nextStep:"\u4E0B\u4E00\u6B65",step1:"\u4E70\u5BB6\u4E0B\u5355",step2:"\u5546\u5BB6\u63A5\u5355",step3:"\u4E70\u5BB6\u63D0\u8D27",step4:"\u4EA4\u6613\u5B8C\u6210",title2:"\u63CF\u8FF0\u4FE1\u606F",title3:"\u7AD6\u5411\u6B65\u9AA4\u6761",status1:"\u3010\u57CE\u5E02\u3011\u7269\u6D41\u72B6\u60011",status2:"\u3010\u57CE\u5E02\u3011\u7269\u6D41\u72B6\u6001",status3:"\u5FEB\u4EF6\u5DF2\u53D1\u8D27",customStyle:"\u81EA\u5B9A\u4E49\u6837\u5F0F"},"en-US":{nextStep:"Next Step",step1:"Step1",step2:"Step2",step3:"Step3",step4:"Step4",title2:"Description",title3:"Vertical Steps",status1:"\u3010City\u3011Status1",status2:"\u3010City\u3011Status2",status3:"\u3010City\u3011Status3",customStyle:"Custom Style"}}),n=(0,i.iH)(1),v=()=>{n.value=++n.value%4};return(t,u)=>{var p=(0,r.up)("demo-block");return(0,r.wg)(),(0,r.iD)(r.HY,null,[(0,r.Wm)(p,{title:(0,i.SU)(e)("basicUsage")},{default:(0,r.w5)(()=>[(0,r.Wm)((0,i.SU)(l.ZP),{active:n.value},{default:(0,r.w5)(()=>[(0,r.Wm)((0,i.SU)(a.Z),null,{default:(0,r.w5)(()=>[(0,r.Uk)((0,o.zw)((0,i.SU)(e)("step1")),1)]),_:1}),(0,r.Wm)((0,i.SU)(a.Z),null,{default:(0,r.w5)(()=>[(0,r.Uk)((0,o.zw)((0,i.SU)(e)("step2")),1)]),_:1}),(0,r.Wm)((0,i.SU)(a.Z),null,{default:(0,r.w5)(()=>[(0,r.Uk)((0,o.zw)((0,i.SU)(e)("step3")),1)]),_:1}),(0,r.Wm)((0,i.SU)(a.Z),null,{default:(0,r.w5)(()=>[(0,r.Uk)((0,o.zw)((0,i.SU)(e)("step4")),1)]),_:1})]),_:1},8,["active"]),(0,r.Wm)((0,i.SU)(c.ZP),{onClick:v},{default:(0,r.w5)(()=>[(0,r.Uk)((0,o.zw)((0,i.SU)(e)("nextStep")),1)]),_:1})]),_:1},8,["title"]),(0,r.Wm)(p,{title:(0,i.SU)(e)("customStyle")},{default:(0,r.w5)(()=>[(0,r.Wm)((0,i.SU)(l.ZP),{active:n.value,"active-icon":"success","inactive-icon":"arrow","active-color":"#07c160"},{default:(0,r.w5)(()=>[(0,r.Wm)((0,i.SU)(a.Z),null,{default:(0,r.w5)(()=>[(0,r.Uk)((0,o.zw)((0,i.SU)(e)("step1")),1)]),_:1}),(0,r.Wm)((0,i.SU)(a.Z),null,{default:(0,r.w5)(()=>[(0,r.Uk)((0,o.zw)((0,i.SU)(e)("step2")),1)]),_:1}),(0,r.Wm)((0,i.SU)(a.Z),null,{default:(0,r.w5)(()=>[(0,r.Uk)((0,o.zw)((0,i.SU)(e)("step3")),1)]),_:1}),(0,r.Wm)((0,i.SU)(a.Z),null,{default:(0,r.w5)(()=>[(0,r.Uk)((0,o.zw)((0,i.SU)(e)("step4")),1)]),_:1})]),_:1},8,["active"])]),_:1},8,["title"]),(0,r.Wm)(p,{title:(0,i.SU)(e)("title3")},{default:(0,r.w5)(()=>[(0,r.Wm)((0,i.SU)(l.ZP),{active:0,direction:"vertical"},{default:(0,r.w5)(()=>[(0,r.Wm)((0,i.SU)(a.Z),null,{default:(0,r.w5)(()=>[(0,r._)("h3",null,(0,o.zw)((0,i.SU)(e)("status1")),1),s]),_:1}),(0,r.Wm)((0,i.SU)(a.Z),null,{default:(0,r.w5)(()=>[(0,r._)("h3",null,(0,o.zw)((0,i.SU)(e)("status2")),1),f]),_:1}),(0,r.Wm)((0,i.SU)(a.Z),null,{default:(0,r.w5)(()=>[(0,r._)("h3",null,(0,o.zw)((0,i.SU)(e)("status3")),1),d]),_:1})]),_:1})]),_:1},8,["title"])],64)}}})},72555:function(t,e,n){"use strict";n.d(e,{Ct:function(){return o}});var r=n("63112"),i=n("63022"),o=(0,r.n)(i.Z);e.ZP=o},99497:function(t,e,n){"use strict";n.d(e,{zx:function(){return o}});var r=n("63112"),i=n("14314"),o=(0,r.n)(i.Z);e.ZP=o},14517:function(t,e,n){"use strict";n.d(e,{H:function(){return o},t:function(){return i}});var r=2e3,i=()=>++r,o=t=>{r=t}},6149:function(t,e,n){"use strict";n.d(e,{BC:function(){return o},g2:function(){return i},yj:function(){return l}}),n("56115"),n("59644");var r=n("80681"),i={to:[String,Object],url:String,replace:Boolean};function o(t){var{to:e,url:n,replace:r,$router:i}=t;e&&i?i[r?"replace":"push"](e):n&&(r?location.replace(n):location.href=n)}function l(){var t=(0,r.FN)().proxy;return()=>o(t)}},96528:function(t,e,n){"use strict";n.d(e,{JO:function(){return o}});var r=n("63112"),i=n("28779"),o=(0,r.n)(i.Z);e.ZP=o},95786:function(t,e,n){"use strict";n.d(e,{gb:function(){return o}});var r=n("63112"),i=n("2309"),o=(0,r.n)(i.Z);e.ZP=o},95922:function(t,e,n){"use strict";var r=n("63112"),i=n("37342"),o=(0,r.n)(i.Z);e.Z=o},88466:function(t,e,n){"use strict";var r=n("63112"),i=n("3893"),o=(0,r.n)(i.ZP);e.ZP=o},8051:function(t,e,n){"use strict";n.d(e,{Cp:function(){return v},T5:function(){return r},WN:function(){return d},_K:function(){return c},a8:function(){return o},dt:function(){return l},e9:function(){return f},k7:function(){return i},mH:function(){return p},pj:function(){return s},r5:function(){return u},xe:function(){return a}}),n("86795");var r="van-hairline",i="".concat(r,"--top"),o="".concat(r,"--left"),l="".concat(r,"--right"),a="".concat(r,"--bottom"),c="".concat(r,"--surround"),u="".concat(r,"--top-bottom"),s="".concat(r,"-unset--top-bottom"),f="van-haptics-feedback",d=Symbol("van-form"),v=500,p=5},78335:function(t,e,n){"use strict";n.d(e,{Ce:function(){return a},J5:function(){return o},Or:function(){return i},SI:function(){return u},SQ:function(){return s},Vg:function(){return r},ir:function(){return l},qM:function(){return c}});var r=null,i=[Number,String],o={type:Boolean,default:!0},l=t=>({type:t,required:!0}),a=()=>({type:Array,default:()=>[]}),c=t=>({type:Number,default:t}),u=t=>({type:i,default:t}),s=t=>({type:String,default:t})},63112:function(t,e,n){"use strict";n.d(e,{n:function(){return i}});var r=n("20358");function i(t){return t.install=e=>{var{name:n}=t;n&&(e.component(n,t),e.component((0,r._A)("-".concat(n)),t))},t}},63022:function(t,e,n){"use strict";n("82116"),n("17989"),n("56115"),n("59644"),n("89176");var r=n("80681"),i=n("62568"),o=n("78335"),l=n("12308"),a=n("20358"),[c,u]=(0,i.do)("badge"),s={dot:Boolean,max:o.Or,tag:(0,o.SQ)("div"),color:String,offset:Array,content:o.Or,showZero:o.J5,position:(0,o.SQ)("top-right")};e.Z=(0,r.aZ)({name:c,props:s,setup(t,e){var{slots:n}=e,i=()=>{if(n.content)return!0;var{content:e,showZero:r}=t;return(0,l.Xq)(e)&&""!==e&&(r||0!==e&&"0"!==e)},o=()=>{var{dot:e,max:r,content:o}=t;if(!e&&i())return n.content?n.content():(0,l.Xq)(r)&&(0,l.kE)(o)&&+o>+r?"".concat(r,"+"):o},c=t=>t.startsWith("-")?t.replace("-",""):"-".concat(t),s=(0,r.Fl)(()=>{var e={background:t.color};if(t.offset){var[r,i]=t.offset,{position:o}=t,[l,u]=o.split("-");n.default?("number"==typeof i?e[l]=(0,a.Nn)("top"===l?i:-i):e[l]="top"===l?(0,a.Nn)(i):c(i),"number"==typeof r?e[u]=(0,a.Nn)("left"===u?r:-r):e[u]="left"===u?(0,a.Nn)(r):c(r)):(e.marginTop=(0,a.Nn)(i),e.marginLeft=(0,a.Nn)(r))}return e}),f=()=>{if(i()||t.dot)return(0,r.Wm)("div",{class:u([t.position,{dot:t.dot,fixed:!!n.default}]),style:s.value},[o()])};return()=>{if(n.default){var{tag:e}=t;return(0,r.Wm)(e,{class:u("wrapper")},{default:()=>[n.default(),f()]})}return f()}}})},14314:function(t,e,n){"use strict";n("82116"),n("17989"),n("24660");var r=n("80681"),i=n("62568"),o=n("12308"),l=n("78335"),a=n("82210"),c=n("8051"),u=n("6149"),s=n("96528"),f=n("95786"),[d,v]=(0,i.do)("button"),p=(0,o.l7)({},u.g2,{tag:(0,l.SQ)("button"),text:String,icon:String,type:(0,l.SQ)("default"),size:(0,l.SQ)("normal"),color:String,block:Boolean,plain:Boolean,round:Boolean,square:Boolean,loading:Boolean,hairline:Boolean,disabled:Boolean,iconPrefix:String,nativeType:(0,l.SQ)("button"),loadingSize:l.Or,loadingText:String,loadingType:String,iconPosition:(0,l.SQ)("left")});e.Z=(0,r.aZ)({name:d,props:p,emits:["click"],setup(t,e){var{emit:n,slots:i}=e,o=(0,u.yj)(),l=()=>i.loading?i.loading():(0,r.Wm)(f.gb,{size:t.loadingSize,type:t.loadingType,class:v("loading")},null),d=()=>t.loading?l():i.icon?(0,r.Wm)("div",{class:v("icon")},[i.icon()]):t.icon?(0,r.Wm)(s.JO,{name:t.icon,class:v("icon"),classPrefix:t.iconPrefix},null):void 0,p=()=>{var e;if(e=t.loading?t.loadingText:i.default?i.default():t.text)return(0,r.Wm)("span",{class:v("text")},[e])},m=()=>{var{color:e,plain:n}=t;if(e){var r={color:n?e:"white"};return!n&&(r.background=e),e.includes("gradient")?r.border=0:r.borderColor=e,r}},S=e=>{t.loading?(0,a.PF)(e):!t.disabled&&(n("click",e),o())};return()=>{var{tag:e,type:n,size:i,block:o,round:l,plain:a,square:u,loading:s,disabled:f,hairline:g,nativeType:h,iconPosition:y}=t,b=[v([n,i,{plain:a,block:o,round:l,square:u,loading:s,disabled:f,hairline:g}]),{[c._K]:g}];return(0,r.Wm)(e,{type:h,class:b,style:m(),disabled:f,onClick:S},{default:()=>[(0,r.Wm)("div",{class:v("content")},["left"===y&&d(),p(),"right"===y&&d()])]})}}})},53419:function(t,e,n){"use strict";n.d(e,{q9:function(){return f}}),n("82116"),n("17989"),n("86795"),n("56115"),n("59644"),n("31564"),n("8649"),n("70629");var r=n("80681"),i=n("62568"),o=n("78335"),l=n("20358"),a=n("12308"),c=n("14517"),[u,s]=(0,i.do)("config-provider"),f=Symbol(u),d={tag:(0,o.SQ)("div"),theme:(0,o.SQ)("light"),zIndex:Number,themeVars:Object,themeVarsDark:Object,themeVarsLight:Object,themeVarsScope:(0,o.SQ)("local"),iconPrefix:String};function v(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Object.keys(t).forEach(n=>{t[n]!==e[n]&&document.documentElement.style.setProperty(n,t[n])}),Object.keys(e).forEach(e=>{!t[e]&&document.documentElement.style.removeProperty(e)})}e.ZP=(0,r.aZ)({name:u,props:d,setup(t,e){var{slots:n}=e,i=(0,r.Fl)(()=>{var e,n;return e=(0,a.l7)({},t.themeVars,"dark"===t.theme?t.themeVarsDark:t.themeVarsLight),n={},Object.keys(e).forEach(t=>{var r=(0,l.GL)(t).replace(/([a-zA-Z])(\d)/g,"$1-$2");n["--van-".concat(r)]=e[t]}),n});if(a._f){var o=()=>{document.documentElement.classList.add("van-theme-".concat(t.theme))},u=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:t.theme;document.documentElement.classList.remove("van-theme-".concat(e))};(0,r.YP)(()=>t.theme,(t,e)=>{e&&u(e),o()},{immediate:!0}),(0,r.dl)(o),(0,r.se)(u),(0,r.Jd)(u),(0,r.YP)(i,(e,n)=>{"global"===t.themeVarsScope&&v(e,n)}),(0,r.YP)(()=>t.themeVarsScope,(t,e)=>{"global"===e&&v({},i.value),"global"===t&&v(i.value,{})}),"global"===t.themeVarsScope&&v(i.value,{})}return(0,r.JJ)(f,t),(0,r.m0)(()=>{void 0!==t.zIndex&&(0,c.H)(t.zIndex)}),()=>(0,r.Wm)(t.tag,{class:s(),style:"local"===t.themeVarsScope?i.value:void 0},{default:()=>{var t;return[null===(t=n.default)||void 0===t?void 0:t.call(n)]}})}})},28779:function(t,e,n){"use strict";n("82116"),n("17989"),n("24660");var r=n("80681"),i=n("62568"),o=n("78335"),l=n("20358"),a=n("72555"),c=n("53419"),[u,s]=(0,i.do)("icon"),f=t=>null==t?void 0:t.includes("/"),d={dot:Boolean,tag:(0,o.SQ)("i"),name:String,size:o.Or,badge:o.Or,color:String,badgeProps:Object,classPrefix:String};e.Z=(0,r.aZ)({name:u,props:d,setup(t,e){var{slots:n}=e,i=(0,r.f3)(c.q9,null),o=(0,r.Fl)(()=>t.classPrefix||(null==i?void 0:i.iconPrefix)||s());return()=>{var{tag:e,dot:i,name:c,size:u,badge:d,color:v}=t,p=f(c);return(0,r.Wm)(a.Ct,(0,r.dG)({dot:i,tag:e,class:[o.value,p?"":"".concat(o.value,"-").concat(c)],style:{color:v,fontSize:(0,l.Nn)(u)},content:d},t.badgeProps),{default:()=>{var t;return[null===(t=n.default)||void 0===t?void 0:t.call(n),p&&(0,r.Wm)("img",{class:s("image"),src:c},null)]}})}}})},2309:function(t,e,n){"use strict";n("82116"),n("17989"),n("66786"),n("14529");var r=n("80681"),i=n("62568"),o=n("78335"),l=n("12308"),a=n("20358"),[c,u]=(0,i.do)("loading"),s=Array(12).fill(null).map((t,e)=>(0,r.Wm)("i",{class:u("line",String(e+1))},null)),f=(0,r.Wm)("svg",{class:u("circular"),viewBox:"25 25 50 50"},[(0,r.Wm)("circle",{cx:"50",cy:"50",r:"20",fill:"none"},null)]),d={size:o.Or,type:(0,o.SQ)("circular"),color:String,vertical:Boolean,textSize:o.Or,textColor:String};e.Z=(0,r.aZ)({name:c,props:d,setup(t,e){var{slots:n}=e,i=(0,r.Fl)(()=>(0,l.l7)({color:t.color},(0,a.Xn)(t.size))),o=()=>{var e="spinner"===t.type?s:f;return(0,r.Wm)("span",{class:u("spinner",t.type),style:i.value},[n.icon?n.icon():e])},c=()=>{if(n.default){var e;return(0,r.Wm)("span",{class:u("text"),style:{fontSize:(0,a.Nn)(t.textSize),color:null!==(e=t.textColor)&&void 0!==e?e:t.color}},[n.default()])}};return()=>{var{type:e,vertical:n}=t;return(0,r.Wm)("div",{class:u([e,{vertical:n}]),"aria-live":"polite","aria-busy":!0},[o(),c()])}}})},37342:function(t,e,n){"use strict";n("82116"),n("17989");var r=n("80681"),i=n("62568"),o=n("8051"),l=n("3893"),a=n("22300"),c=n("96528"),[u,s]=(0,i.do)("step");e.Z=(0,r.aZ)({name:u,setup(t,e){var{slots:n}=e,{parent:i,index:u}=(0,a.NB)(l.sO);if(i){var f=i.props,d=()=>{var t=+f.active;return u.value<t?"finish":u.value===t?"process":"waiting"},v=()=>"process"===d(),p=(0,r.Fl)(()=>({background:"finish"===d()?f.activeColor:f.inactiveColor})),m=(0,r.Fl)(()=>v()?{color:f.activeColor}:"waiting"===d()?{color:f.inactiveColor}:void 0),S=()=>i.onClickStep(u.value),g=()=>{var{iconPrefix:t,finishIcon:e,activeIcon:i,activeColor:o,inactiveIcon:l}=f;if(v())return n["active-icon"]?n["active-icon"]():(0,r.Wm)(c.JO,{class:s("icon","active"),name:i,color:o,classPrefix:t},null);if("finish"===d()&&(e||n["finish-icon"]))return n["finish-icon"]?n["finish-icon"]():(0,r.Wm)(c.JO,{class:s("icon","finish"),name:e,color:o,classPrefix:t},null);return n["inactive-icon"]?n["inactive-icon"]():l?(0,r.Wm)(c.JO,{class:s("icon"),name:l,classPrefix:t},null):(0,r.Wm)("i",{class:s("circle"),style:p.value},null)};return()=>{var t,e=d();return(0,r.Wm)("div",{class:[o.T5,s([f.direction,{[e]:e}])]},[(0,r.Wm)("div",{class:s("title",{active:v()}),style:m.value,onClick:S},[null===(t=n.default)||void 0===t?void 0:t.call(n)]),(0,r.Wm)("div",{class:s("circle-container"),onClick:S},[g()]),(0,r.Wm)("div",{class:s("line"),style:p.value},null)])}}}})},3893:function(t,e,n){"use strict";n.d(e,{sO:function(){return s}}),n("82116"),n("17989"),n("86795");var r=n("80681"),i=n("62568"),o=n("78335"),l=n("22300"),[a,c]=(0,i.do)("steps"),u={active:(0,o.SI)(0),direction:(0,o.SQ)("horizontal"),activeIcon:(0,o.SQ)("checked"),iconPrefix:String,finishIcon:String,activeColor:String,inactiveIcon:String,inactiveColor:String},s=Symbol(a);e.ZP=(0,r.aZ)({name:a,props:u,emits:["clickStep"],setup(t,e){var{emit:n,slots:i}=e,{linkChildren:o}=(0,l.$E)(s);return o({props:t,onClickStep:t=>n("clickStep",t)}),()=>{var e;return(0,r.Wm)("div",{class:c([t.direction])},[(0,r.Wm)("div",{class:c("items")},[null===(e=i.default)||void 0===e?void 0:e.call(i)])])}}})},85985:function(t,e,n){"use strict";n.r(t.exports={})},86090:function(t,e,n){"use strict";n.r(t.exports={})}}]); |