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 6499.3fbfc225.js.LICENSE.txt */
|
|
(self.webpackChunk=self.webpackChunk||[]).push([["6499"],{39717:function(t,e,l){"use strict";l.r(e);var n=l("27545");l("50396");let r=n.Z;e.default=r},27545:function(t,e,l){"use strict";var n=l("80681"),r=l("11848"),o=l("57122"),i=l("19231"),u=l("99742"),a=l("88102"),c=l("96528"),s=l("54369"),d={class:"custom-title"};e.Z=(0,n.aZ)({__name:"index",setup(t){var e=(0,s.q)({"zh-CN":{cell:"\u5355\u5143\u683C",group:"\u5206\u7EC4",router:"\u9875\u9762\u5BFC\u822A",urlRoute:"URL \u8DF3\u8F6C",vueRoute:"\u8DEF\u7531\u8DF3\u8F6C",useSlots:"\u4F7F\u7528\u63D2\u69FD",showIcon:"\u5C55\u793A\u56FE\u6807",showArrow:"\u5C55\u793A\u7BAD\u5934",largeSize:"\u5355\u5143\u683C\u5927\u5C0F",groupTitle:"\u5206\u7EC4\u6807\u9898",insetGrouped:"\u5361\u7247\u98CE\u683C",verticalCenter:"\u5782\u76F4\u5C45\u4E2D"},"en-US":{cell:"Cell title",group:"Group",router:"Router",urlRoute:"URL",vueRoute:"Vue Router",useSlots:"Use Slots",showIcon:"Left Icon",showArrow:"Link",largeSize:"Size",groupTitle:"Group Title",insetGrouped:"Inset Grouped",verticalCenter:"Vertical center"}});return(t,l)=>{var s=(0,n.up)("demo-block");return(0,n.wg)(),(0,n.iD)(n.HY,null,[(0,n.Wm)(s,{title:(0,r.SU)(e)("basicUsage")},{default:(0,n.w5)(()=>[(0,n.Wm)((0,r.SU)(i.ZP),null,{default:(0,n.w5)(()=>[(0,n.Wm)((0,r.SU)(u.ZP),{title:(0,r.SU)(e)("cell"),value:(0,r.SU)(e)("content")},null,8,["title","value"]),(0,n.Wm)((0,r.SU)(u.ZP),{title:(0,r.SU)(e)("cell"),value:(0,r.SU)(e)("content"),label:(0,r.SU)(e)("desc")},null,8,["title","value","label"])]),_:1})]),_:1},8,["title"]),(0,n.Wm)(s,{title:(0,r.SU)(e)("insetGrouped")},{default:(0,n.w5)(()=>[(0,n.Wm)((0,r.SU)(i.ZP),{inset:""},{default:(0,n.w5)(()=>[(0,n.Wm)((0,r.SU)(u.ZP),{title:(0,r.SU)(e)("cell"),value:(0,r.SU)(e)("content")},null,8,["title","value"]),(0,n.Wm)((0,r.SU)(u.ZP),{title:(0,r.SU)(e)("cell"),value:(0,r.SU)(e)("content"),label:(0,r.SU)(e)("desc")},null,8,["title","value","label"])]),_:1})]),_:1},8,["title"]),(0,n.Wm)(s,{title:(0,r.SU)(e)("largeSize")},{default:(0,n.w5)(()=>[(0,n.Wm)((0,r.SU)(u.ZP),{title:(0,r.SU)(e)("cell"),value:(0,r.SU)(e)("content"),size:"large"},null,8,["title","value"]),(0,n.Wm)((0,r.SU)(u.ZP),{title:(0,r.SU)(e)("cell"),value:(0,r.SU)(e)("content"),size:"large",label:(0,r.SU)(e)("desc")},null,8,["title","value","label"])]),_:1},8,["title"]),(0,n.Wm)(s,{title:(0,r.SU)(e)("showIcon")},{default:(0,n.w5)(()=>[(0,n.Wm)((0,r.SU)(u.ZP),{title:(0,r.SU)(e)("cell"),value:(0,r.SU)(e)("content"),icon:"location-o"},null,8,["title","value"])]),_:1},8,["title"]),(0,n.Wm)(s,{title:(0,r.SU)(e)("showArrow")},{default:(0,n.w5)(()=>[(0,n.Wm)((0,r.SU)(u.ZP),{title:(0,r.SU)(e)("cell"),"is-link":""},null,8,["title"]),(0,n.Wm)((0,r.SU)(u.ZP),{title:(0,r.SU)(e)("cell"),"is-link":"",value:(0,r.SU)(e)("content")},null,8,["title","value"]),(0,n.Wm)((0,r.SU)(u.ZP),{title:(0,r.SU)(e)("cell"),"is-link":"","arrow-direction":"down",value:(0,r.SU)(e)("content")},null,8,["title","value"])]),_:1},8,["title"]),(0,n.Wm)(s,{title:(0,r.SU)(e)("router")},{default:(0,n.w5)(()=>[(0,n.Wm)((0,r.SU)(u.ZP),{title:(0,r.SU)(e)("urlRoute"),"is-link":"",url:"https://github.com/vant-ui/vant"},null,8,["title"]),(0,n.Wm)((0,r.SU)(u.ZP),{title:(0,r.SU)(e)("vueRoute"),"is-link":"",to:"index"},null,8,["title"])]),_:1},8,["title"]),(0,n.Wm)(s,{title:(0,r.SU)(e)("groupTitle")},{default:(0,n.w5)(()=>[(0,n.Wm)((0,r.SU)(i.ZP),{title:"".concat((0,r.SU)(e)("group")," 1")},{default:(0,n.w5)(()=>[(0,n.Wm)((0,r.SU)(u.ZP),{title:(0,r.SU)(e)("cell"),value:(0,r.SU)(e)("content")},null,8,["title","value"])]),_:1},8,["title"]),(0,n.Wm)((0,r.SU)(i.ZP),{title:"".concat((0,r.SU)(e)("group")," 2")},{default:(0,n.w5)(()=>[(0,n.Wm)((0,r.SU)(u.ZP),{title:(0,r.SU)(e)("cell"),value:(0,r.SU)(e)("content")},null,8,["title","value"])]),_:1},8,["title"])]),_:1},8,["title"]),(0,n.Wm)(s,{title:(0,r.SU)(e)("useSlots")},{default:(0,n.w5)(()=>[(0,n.Wm)((0,r.SU)(u.ZP),{value:(0,r.SU)(e)("content"),"is-link":""},{title:(0,n.w5)(()=>[(0,n._)("span",d,(0,o.zw)((0,r.SU)(e)("cell")),1),(0,n.Wm)((0,r.SU)(a.ZP),{type:"primary"},{default:(0,n.w5)(()=>[(0,n.Uk)((0,o.zw)((0,r.SU)(e)("tag")),1)]),_:1})]),_:1},8,["value"]),(0,n.Wm)((0,r.SU)(u.ZP),{icon:"shop-o",title:(0,r.SU)(e)("cell")},{"right-icon":(0,n.w5)(()=>[(0,n.Wm)((0,r.SU)(c.ZP),{name:"search",class:"search-icon"})]),_:1},8,["title"])]),_:1},8,["title"]),(0,n.Wm)(s,{title:(0,r.SU)(e)("verticalCenter")},{default:(0,n.w5)(()=>[(0,n.Wm)((0,r.SU)(u.ZP),{center:"",title:(0,r.SU)(e)("cell"),value:(0,r.SU)(e)("content"),label:(0,r.SU)(e)("desc")},null,8,["title","value","label"])]),_:1},8,["title"])],64)}}})},72555:function(t,e,l){"use strict";l.d(e,{Ct:function(){return o}});var n=l("63112"),r=l("63022"),o=(0,n.n)(r.Z);e.ZP=o},19231:function(t,e,l){"use strict";var n=l("63112"),r=l("73769"),o=(0,n.n)(r.Z);e.ZP=o},99742:function(t,e,l){"use strict";l.d(e,{bL:function(){return o}});var n=l("63112"),r=l("54499"),o=(0,n.n)(r.ZP);e.ZP=o},14517:function(t,e,l){"use strict";l.d(e,{H:function(){return o},t:function(){return r}});var n=2e3,r=()=>++n,o=t=>{n=t}},6149:function(t,e,l){"use strict";l.d(e,{BC:function(){return o},g2:function(){return r},yj:function(){return i}}),l("56115"),l("59644");var n=l("80681"),r={to:[String,Object],url:String,replace:Boolean};function o(t){var{to:e,url:l,replace:n,$router:r}=t;e&&r?r[n?"replace":"push"](e):l&&(n?location.replace(l):location.href=l)}function i(){var t=(0,n.FN)().proxy;return()=>o(t)}},96277:function(t,e,l){"use strict";l.d(e,{a:function(){return r}});var n=l("80681"),r=()=>{var t,{scopeId:e}=(null===(t=(0,n.FN)())||void 0===t?void 0:t.vnode)||{};return e?{[e]:""}:null}},96528:function(t,e,l){"use strict";l.d(e,{JO:function(){return o}});var n=l("63112"),r=l("28779"),o=(0,n.n)(r.Z);e.ZP=o},88102:function(t,e,l){"use strict";l.d(e,{Vp:function(){return o}});var n=l("63112"),r=l("8291"),o=(0,n.n)(r.Z);e.ZP=o},8051:function(t,e,l){"use strict";l.d(e,{Cp:function(){return f},T5:function(){return n},WN:function(){return v},_K:function(){return a},a8:function(){return o},dt:function(){return i},e9:function(){return d},k7:function(){return r},mH:function(){return m},pj:function(){return s},r5:function(){return c},xe:function(){return u}}),l("86795");var n="van-hairline",r="".concat(n,"--top"),o="".concat(n,"--left"),i="".concat(n,"--right"),u="".concat(n,"--bottom"),a="".concat(n,"--surround"),c="".concat(n,"--top-bottom"),s="".concat(n,"-unset--top-bottom"),d="van-haptics-feedback",v=Symbol("van-form"),f=500,m=5},78335:function(t,e,l){"use strict";l.d(e,{Ce:function(){return u},J5:function(){return o},Or:function(){return r},SI:function(){return c},SQ:function(){return s},Vg:function(){return n},ir:function(){return i},qM:function(){return a}});var n=null,r=[Number,String],o={type:Boolean,default:!0},i=t=>({type:t,required:!0}),u=()=>({type:Array,default:()=>[]}),a=t=>({type:Number,default:t}),c=t=>({type:r,default:t}),s=t=>({type:String,default:t})},63112:function(t,e,l){"use strict";l.d(e,{n:function(){return r}});var n=l("20358");function r(t){return t.install=e=>{var{name:l}=t;l&&(e.component(l,t),e.component((0,n._A)("-".concat(l)),t))},t}},63022:function(t,e,l){"use strict";l("82116"),l("17989"),l("56115"),l("59644"),l("89176");var n=l("80681"),r=l("62568"),o=l("78335"),i=l("12308"),u=l("20358"),[a,c]=(0,r.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,n.aZ)({name:a,props:s,setup(t,e){var{slots:l}=e,r=()=>{if(l.content)return!0;var{content:e,showZero:n}=t;return(0,i.Xq)(e)&&""!==e&&(n||0!==e&&"0"!==e)},o=()=>{var{dot:e,max:n,content:o}=t;if(!e&&r())return l.content?l.content():(0,i.Xq)(n)&&(0,i.kE)(o)&&+o>+n?"".concat(n,"+"):o},a=t=>t.startsWith("-")?t.replace("-",""):"-".concat(t),s=(0,n.Fl)(()=>{var e={background:t.color};if(t.offset){var[n,r]=t.offset,{position:o}=t,[i,c]=o.split("-");l.default?("number"==typeof r?e[i]=(0,u.Nn)("top"===i?r:-r):e[i]="top"===i?(0,u.Nn)(r):a(r),"number"==typeof n?e[c]=(0,u.Nn)("left"===c?n:-n):e[c]="left"===c?(0,u.Nn)(n):a(n)):(e.marginTop=(0,u.Nn)(r),e.marginLeft=(0,u.Nn)(n))}return e}),d=()=>{if(r()||t.dot)return(0,n.Wm)("div",{class:c([t.position,{dot:t.dot,fixed:!!l.default}]),style:s.value},[o()])};return()=>{if(l.default){var{tag:e}=t;return(0,n.Wm)(e,{class:c("wrapper")},{default:()=>[l.default(),d()]})}return d()}}})},73769:function(t,e,l){"use strict";l("82116"),l("17989");var n=l("80681"),r=l("62568"),o=l("78335"),i=l("8051"),u=l("96277"),[a,c]=(0,r.do)("cell-group"),s={title:String,inset:Boolean,border:o.J5};e.Z=(0,n.aZ)({name:a,inheritAttrs:!1,props:s,setup(t,e){var{slots:l,attrs:r}=e,o=()=>{var e;return(0,n.Wm)("div",(0,n.dG)({class:[c({inset:t.inset}),{[i.r5]:t.border&&!t.inset}]},r,(0,u.a)()),[null===(e=l.default)||void 0===e?void 0:e.call(l)])},a=()=>(0,n.Wm)("div",{class:c("title",{inset:t.inset})},[l.title?l.title():t.title]);return()=>t.title||l.title?(0,n.Wm)(n.HY,null,[a(),o()]):o()}})},54499:function(t,e,l){"use strict";l.d(e,{x_:function(){return d}}),l("82116"),l("17989");var n=l("80681"),r=l("62568"),o=l("78335"),i=l("12308"),u=l("6149"),a=l("96528"),[c,s]=(0,r.do)("cell"),d={tag:(0,o.SQ)("div"),icon:String,size:String,title:o.Or,value:o.Or,label:o.Or,center:Boolean,isLink:Boolean,border:o.J5,iconPrefix:String,valueClass:o.Vg,labelClass:o.Vg,titleClass:o.Vg,titleStyle:null,arrowDirection:String,required:{type:[Boolean,String],default:null},clickable:{type:Boolean,default:null}},v=(0,i.l7)({},d,u.g2);e.ZP=(0,n.aZ)({name:c,props:v,setup(t,e){var{slots:l}=e,r=(0,u.yj)(),o=()=>{if(l.label||(0,i.Xq)(t.label))return(0,n.Wm)("div",{class:[s("label"),t.labelClass]},[l.label?l.label():t.label])},c=()=>{if(l.title||(0,i.Xq)(t.title)){var e,r=null===(e=l.title)||void 0===e?void 0:e.call(l);if(!Array.isArray(r)||0!==r.length)return(0,n.Wm)("div",{class:[s("title"),t.titleClass],style:t.titleStyle},[r||(0,n.Wm)("span",null,[t.title]),o()])}},d=()=>{var e=l.value||l.default;if(e||(0,i.Xq)(t.value))return(0,n.Wm)("div",{class:[s("value"),t.valueClass]},[e?e():(0,n.Wm)("span",null,[t.value])])},v=()=>l.icon?l.icon():t.icon?(0,n.Wm)(a.JO,{name:t.icon,class:s("left-icon"),classPrefix:t.iconPrefix},null):void 0,f=()=>{if(l["right-icon"])return l["right-icon"]();if(t.isLink){var e=t.arrowDirection&&"right"!==t.arrowDirection?"arrow-".concat(t.arrowDirection):"arrow";return(0,n.Wm)(a.JO,{name:e,class:s("right-icon")},null)}};return()=>{var e,{tag:o,size:i,center:u,border:a,isLink:m,required:S}=t,p=null!==(e=t.clickable)&&void 0!==e?e:m,g={center:u,required:!!S,clickable:p,borderless:!a};return i&&(g[i]=!!i),(0,n.Wm)(o,{class:s(g),role:p?"button":void 0,tabindex:p?0:void 0,onClick:r},{default:()=>{var t;return[v(),c(),d(),f(),null===(t=l.extra)||void 0===t?void 0:t.call(l)]}})}}})},53419:function(t,e,l){"use strict";l.d(e,{q9:function(){return d}}),l("82116"),l("17989"),l("86795"),l("56115"),l("59644"),l("31564"),l("8649"),l("70629");var n=l("80681"),r=l("62568"),o=l("78335"),i=l("20358"),u=l("12308"),a=l("14517"),[c,s]=(0,r.do)("config-provider"),d=Symbol(c),v={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 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(l=>{t[l]!==e[l]&&document.documentElement.style.setProperty(l,t[l])}),Object.keys(e).forEach(e=>{!t[e]&&document.documentElement.style.removeProperty(e)})}e.ZP=(0,n.aZ)({name:c,props:v,setup(t,e){var{slots:l}=e,r=(0,n.Fl)(()=>{var e,l;return e=(0,u.l7)({},t.themeVars,"dark"===t.theme?t.themeVarsDark:t.themeVarsLight),l={},Object.keys(e).forEach(t=>{var n=(0,i.GL)(t).replace(/([a-zA-Z])(\d)/g,"$1-$2");l["--van-".concat(n)]=e[t]}),l});if(u._f){var o=()=>{document.documentElement.classList.add("van-theme-".concat(t.theme))},c=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:t.theme;document.documentElement.classList.remove("van-theme-".concat(e))};(0,n.YP)(()=>t.theme,(t,e)=>{e&&c(e),o()},{immediate:!0}),(0,n.dl)(o),(0,n.se)(c),(0,n.Jd)(c),(0,n.YP)(r,(e,l)=>{"global"===t.themeVarsScope&&f(e,l)}),(0,n.YP)(()=>t.themeVarsScope,(t,e)=>{"global"===e&&f({},r.value),"global"===t&&f(r.value,{})}),"global"===t.themeVarsScope&&f(r.value,{})}return(0,n.JJ)(d,t),(0,n.m0)(()=>{void 0!==t.zIndex&&(0,a.H)(t.zIndex)}),()=>(0,n.Wm)(t.tag,{class:s(),style:"local"===t.themeVarsScope?r.value:void 0},{default:()=>{var t;return[null===(t=l.default)||void 0===t?void 0:t.call(l)]}})}})},28779:function(t,e,l){"use strict";l("82116"),l("17989"),l("24660");var n=l("80681"),r=l("62568"),o=l("78335"),i=l("20358"),u=l("72555"),a=l("53419"),[c,s]=(0,r.do)("icon"),d=t=>null==t?void 0:t.includes("/"),v={dot:Boolean,tag:(0,o.SQ)("i"),name:String,size:o.Or,badge:o.Or,color:String,badgeProps:Object,classPrefix:String};e.Z=(0,n.aZ)({name:c,props:v,setup(t,e){var{slots:l}=e,r=(0,n.f3)(a.q9,null),o=(0,n.Fl)(()=>t.classPrefix||(null==r?void 0:r.iconPrefix)||s());return()=>{var{tag:e,dot:r,name:a,size:c,badge:v,color:f}=t,m=d(a);return(0,n.Wm)(u.Ct,(0,n.dG)({dot:r,tag:e,class:[o.value,m?"":"".concat(o.value,"-").concat(a)],style:{color:f,fontSize:(0,i.Nn)(c)},content:v},t.badgeProps),{default:()=>{var t;return[null===(t=l.default)||void 0===t?void 0:t.call(l),m&&(0,n.Wm)("img",{class:s("image"),src:a},null)]}})}}})},8291:function(t,e,l){"use strict";l("82116"),l("17989");var n=l("80681"),r=l("39594"),o=l("62568"),i=l("78335"),u=l("8051"),a=l("96528"),[c,s]=(0,o.do)("tag"),d={size:String,mark:Boolean,show:i.J5,type:(0,i.SQ)("default"),color:String,plain:Boolean,round:Boolean,textColor:String,closeable:Boolean};e.Z=(0,n.aZ)({name:c,props:d,emits:["close"],setup(t,e){var{slots:l,emit:o}=e,i=t=>{t.stopPropagation(),o("close",t)},c=()=>t.plain?{color:t.textColor||t.color,borderColor:t.color}:{color:t.textColor,background:t.color},d=()=>{var e,{type:r,mark:o,plain:d,round:v,size:f,closeable:m}=t,S={mark:o,plain:d,round:v};f&&(S[f]=f);var p=m&&(0,n.Wm)(a.JO,{name:"cross",class:[s("close"),u.e9],onClick:i},null);return(0,n.Wm)("span",{style:c(),class:s([S,r])},[null===(e=l.default)||void 0===e?void 0:e.call(l),p])};return()=>(0,n.Wm)(r.uT,{name:t.closeable?"van-fade":void 0},{default:()=>[t.show?d():null]})}})},50396:function(t,e,l){"use strict";l.r(t.exports={})},36614:function(t,e,l){"use strict";l.r(t.exports={})}}]); |