mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-06 03:57:59 +08:00
2 lines
8.5 KiB
JavaScript
2 lines
8.5 KiB
JavaScript
/*! For license information please see 5722.1aae3bd4.js.LICENSE.txt */
|
|
(self.webpackChunk=self.webpackChunk||[]).push([["5722"],{48374:function(t,e,n){"use strict";n.r(e);var l=n("53413");n("70987");let o=l.Z;e.default=o},53413:function(t,e,n){"use strict";var l=n("80681"),o=n("11848"),a=n("72555"),r=n("96528"),c=n("54369"),u=(0,l._)("div",{class:"child"},null,-1),i=(0,l._)("div",{class:"child"},null,-1),s=(0,l._)("div",{class:"child"},null,-1),d=(0,l._)("div",{class:"child"},null,-1),m=(0,l._)("div",{class:"child"},null,-1),f=(0,l._)("div",{class:"child"},null,-1),v=(0,l._)("div",{class:"child"},null,-1),p=(0,l._)("div",{class:"child"},null,-1),h=(0,l._)("div",{class:"child"},null,-1),S=(0,l._)("div",{class:"child"},null,-1),g=(0,l._)("div",{class:"child"},null,-1),_=(0,l._)("div",{class:"child"},null,-1),P=(0,l._)("div",{class:"child"},null,-1),Z=(0,l._)("div",{class:"child"},null,-1),W=(0,l._)("div",{class:"child"},null,-1),b=(0,l._)("div",{class:"child"},null,-1);e.Z=(0,l.aZ)({__name:"index",setup(t){var e=(0,c.q)({"zh-CN":{max:"\u6700\u5927\u503C",standalone:"\u72EC\u7ACB\u5C55\u793A",customColor:"\u81EA\u5B9A\u4E49\u989C\u8272",customContent:"\u81EA\u5B9A\u4E49\u5FBD\u6807\u5185\u5BB9",customPosition:"\u81EA\u5B9A\u4E49\u5FBD\u6807\u4F4D\u7F6E"},"en-US":{max:"Max",standalone:"Standalone",customColor:"Custom Color",customContent:"Custom Content",customPosition:"Custom Position"}});return(t,n)=>{var c=(0,l.up)("demo-block");return(0,l.wg)(),(0,l.iD)(l.HY,null,[(0,l.Wm)(c,{title:(0,o.SU)(e)("basicUsage")},{default:(0,l.w5)(()=>[(0,l.Wm)((0,o.SU)(a.ZP),{content:"5"},{default:(0,l.w5)(()=>[u]),_:1}),(0,l.Wm)((0,o.SU)(a.ZP),{content:"10"},{default:(0,l.w5)(()=>[i]),_:1}),(0,l.Wm)((0,o.SU)(a.ZP),{content:"Hot"},{default:(0,l.w5)(()=>[s]),_:1}),(0,l.Wm)((0,o.SU)(a.ZP),{dot:""},{default:(0,l.w5)(()=>[d]),_:1})]),_:1},8,["title"]),(0,l.Wm)(c,{title:(0,o.SU)(e)("max")},{default:(0,l.w5)(()=>[(0,l.Wm)((0,o.SU)(a.ZP),{content:"20",max:"9"},{default:(0,l.w5)(()=>[m]),_:1}),(0,l.Wm)((0,o.SU)(a.ZP),{content:"50",max:"20"},{default:(0,l.w5)(()=>[f]),_:1}),(0,l.Wm)((0,o.SU)(a.ZP),{content:"200",max:"99"},{default:(0,l.w5)(()=>[v]),_:1})]),_:1},8,["title"]),(0,l.Wm)(c,{title:(0,o.SU)(e)("customColor")},{default:(0,l.w5)(()=>[(0,l.Wm)((0,o.SU)(a.ZP),{content:"5",color:"#1989fa"},{default:(0,l.w5)(()=>[p]),_:1}),(0,l.Wm)((0,o.SU)(a.ZP),{content:"10",color:"#1989fa"},{default:(0,l.w5)(()=>[h]),_:1}),(0,l.Wm)((0,o.SU)(a.ZP),{dot:"",color:"#1989fa"},{default:(0,l.w5)(()=>[S]),_:1})]),_:1},8,["title"]),(0,l.Wm)(c,{title:(0,o.SU)(e)("customContent")},{default:(0,l.w5)(()=>[(0,l.Wm)((0,o.SU)(a.ZP),null,{content:(0,l.w5)(()=>[(0,l.Wm)((0,o.SU)(r.ZP),{name:"success",class:"badge-icon"})]),default:(0,l.w5)(()=>[g]),_:1}),(0,l.Wm)((0,o.SU)(a.ZP),null,{content:(0,l.w5)(()=>[(0,l.Wm)((0,o.SU)(r.ZP),{name:"cross",class:"badge-icon"})]),default:(0,l.w5)(()=>[_]),_:1}),(0,l.Wm)((0,o.SU)(a.ZP),null,{content:(0,l.w5)(()=>[(0,l.Wm)((0,o.SU)(r.ZP),{name:"down",class:"badge-icon"})]),default:(0,l.w5)(()=>[P]),_:1})]),_:1},8,["title"]),(0,l.Wm)(c,{title:(0,o.SU)(e)("customPosition")},{default:(0,l.w5)(()=>[(0,l.Wm)((0,o.SU)(a.ZP),{content:"10",position:"top-left"},{default:(0,l.w5)(()=>[Z]),_:1}),(0,l.Wm)((0,o.SU)(a.ZP),{content:"10",position:"bottom-left"},{default:(0,l.w5)(()=>[W]),_:1}),(0,l.Wm)((0,o.SU)(a.ZP),{content:"10",position:"bottom-right"},{default:(0,l.w5)(()=>[b]),_:1})]),_:1},8,["title"]),(0,l.Wm)(c,{title:(0,o.SU)(e)("standalone")},{default:(0,l.w5)(()=>[(0,l.Wm)((0,o.SU)(a.ZP),{content:"20",style:{"margin-left":"16px"}}),(0,l.Wm)((0,o.SU)(a.ZP),{content:"200",max:"99",style:{"margin-left":"16px"}})]),_:1},8,["title"])],64)}}})},72555:function(t,e,n){"use strict";n.d(e,{Ct:function(){return a}});var l=n("63112"),o=n("63022"),a=(0,l.n)(o.Z);e.ZP=a},14517:function(t,e,n){"use strict";n.d(e,{H:function(){return a},t:function(){return o}});var l=2e3,o=()=>++l,a=t=>{l=t}},96528:function(t,e,n){"use strict";n.d(e,{JO:function(){return a}});var l=n("63112"),o=n("28779"),a=(0,l.n)(o.Z);e.ZP=a},78335:function(t,e,n){"use strict";n.d(e,{Ce:function(){return c},J5:function(){return a},Or:function(){return o},SI:function(){return i},SQ:function(){return s},Vg:function(){return l},ir:function(){return r},qM:function(){return u}});var l=null,o=[Number,String],a={type:Boolean,default:!0},r=t=>({type:t,required:!0}),c=()=>({type:Array,default:()=>[]}),u=t=>({type:Number,default:t}),i=t=>({type:o,default:t}),s=t=>({type:String,default:t})},63112:function(t,e,n){"use strict";n.d(e,{n:function(){return o}});var l=n("20358");function o(t){return t.install=e=>{var{name:n}=t;n&&(e.component(n,t),e.component((0,l._A)("-".concat(n)),t))},t}},63022:function(t,e,n){"use strict";n("82116"),n("17989"),n("56115"),n("59644"),n("89176");var l=n("80681"),o=n("62568"),a=n("78335"),r=n("12308"),c=n("20358"),[u,i]=(0,o.do)("badge"),s={dot:Boolean,max:a.Or,tag:(0,a.SQ)("div"),color:String,offset:Array,content:a.Or,showZero:a.J5,position:(0,a.SQ)("top-right")};e.Z=(0,l.aZ)({name:u,props:s,setup(t,e){var{slots:n}=e,o=()=>{if(n.content)return!0;var{content:e,showZero:l}=t;return(0,r.Xq)(e)&&""!==e&&(l||0!==e&&"0"!==e)},a=()=>{var{dot:e,max:l,content:a}=t;if(!e&&o())return n.content?n.content():(0,r.Xq)(l)&&(0,r.kE)(a)&&+a>+l?"".concat(l,"+"):a},u=t=>t.startsWith("-")?t.replace("-",""):"-".concat(t),s=(0,l.Fl)(()=>{var e={background:t.color};if(t.offset){var[l,o]=t.offset,{position:a}=t,[r,i]=a.split("-");n.default?("number"==typeof o?e[r]=(0,c.Nn)("top"===r?o:-o):e[r]="top"===r?(0,c.Nn)(o):u(o),"number"==typeof l?e[i]=(0,c.Nn)("left"===i?l:-l):e[i]="left"===i?(0,c.Nn)(l):u(l)):(e.marginTop=(0,c.Nn)(o),e.marginLeft=(0,c.Nn)(l))}return e}),d=()=>{if(o()||t.dot)return(0,l.Wm)("div",{class:i([t.position,{dot:t.dot,fixed:!!n.default}]),style:s.value},[a()])};return()=>{if(n.default){var{tag:e}=t;return(0,l.Wm)(e,{class:i("wrapper")},{default:()=>[n.default(),d()]})}return d()}}})},53419:function(t,e,n){"use strict";n.d(e,{q9:function(){return d}}),n("82116"),n("17989"),n("86795"),n("56115"),n("59644"),n("31564"),n("8649"),n("70629");var l=n("80681"),o=n("62568"),a=n("78335"),r=n("20358"),c=n("12308"),u=n("14517"),[i,s]=(0,o.do)("config-provider"),d=Symbol(i),m={tag:(0,a.SQ)("div"),theme:(0,a.SQ)("light"),zIndex:Number,themeVars:Object,themeVarsDark:Object,themeVarsLight:Object,themeVarsScope:(0,a.SQ)("local"),iconPrefix:String};function f(){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,l.aZ)({name:i,props:m,setup(t,e){var{slots:n}=e,o=(0,l.Fl)(()=>{var e,n;return e=(0,c.l7)({},t.themeVars,"dark"===t.theme?t.themeVarsDark:t.themeVarsLight),n={},Object.keys(e).forEach(t=>{var l=(0,r.GL)(t).replace(/([a-zA-Z])(\d)/g,"$1-$2");n["--van-".concat(l)]=e[t]}),n});if(c._f){var a=()=>{document.documentElement.classList.add("van-theme-".concat(t.theme))},i=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:t.theme;document.documentElement.classList.remove("van-theme-".concat(e))};(0,l.YP)(()=>t.theme,(t,e)=>{e&&i(e),a()},{immediate:!0}),(0,l.dl)(a),(0,l.se)(i),(0,l.Jd)(i),(0,l.YP)(o,(e,n)=>{"global"===t.themeVarsScope&&f(e,n)}),(0,l.YP)(()=>t.themeVarsScope,(t,e)=>{"global"===e&&f({},o.value),"global"===t&&f(o.value,{})}),"global"===t.themeVarsScope&&f(o.value,{})}return(0,l.JJ)(d,t),(0,l.m0)(()=>{void 0!==t.zIndex&&(0,u.H)(t.zIndex)}),()=>(0,l.Wm)(t.tag,{class:s(),style:"local"===t.themeVarsScope?o.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 l=n("80681"),o=n("62568"),a=n("78335"),r=n("20358"),c=n("72555"),u=n("53419"),[i,s]=(0,o.do)("icon"),d=t=>null==t?void 0:t.includes("/"),m={dot:Boolean,tag:(0,a.SQ)("i"),name:String,size:a.Or,badge:a.Or,color:String,badgeProps:Object,classPrefix:String};e.Z=(0,l.aZ)({name:i,props:m,setup(t,e){var{slots:n}=e,o=(0,l.f3)(u.q9,null),a=(0,l.Fl)(()=>t.classPrefix||(null==o?void 0:o.iconPrefix)||s());return()=>{var{tag:e,dot:o,name:u,size:i,badge:m,color:f}=t,v=d(u);return(0,l.Wm)(c.Ct,(0,l.dG)({dot:o,tag:e,class:[a.value,v?"":"".concat(a.value,"-").concat(u)],style:{color:f,fontSize:(0,r.Nn)(i)},content:m},t.badgeProps),{default:()=>{var t;return[null===(t=n.default)||void 0===t?void 0:t.call(n),v&&(0,l.Wm)("img",{class:s("image"),src:u},null)]}})}}})},70987:function(t,e,n){"use strict";n.r(t.exports={})},80495:function(t,e,n){"use strict";n.r(t.exports={})}}]); |