mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-06 03:57:59 +08:00
2 lines
8.4 KiB
JavaScript
2 lines
8.4 KiB
JavaScript
/*! For license information please see 2173.491b8d35.js.LICENSE.txt */
|
|
(self.webpackChunk=self.webpackChunk||[]).push([["2173"],{31079:function(e,t,l){"use strict";l.r(t);var a=l("84952");l("65396");let r=a.Z;t.default=r},84952:function(e,t,l){"use strict";var a=l("80681"),r=l("11848"),u=l("57122"),i=l("38588"),o=l("99497"),n=l("98003"),d=l("12659"),m=l("54369");let c=(0,a._)("div",{style:{padding:"40px 20px",background:"#fff"}},"Block",-1);t.Z={__name:"index",setup(e){let t=(0,m.q)({"zh-CN":{vertical:"\u5782\u76F4\u6392\u5217",customSize:"\u81EA\u5B9A\u4E49\u95F4\u8DDD",align:"\u5BF9\u9F50\u65B9\u5F0F",wrap:"\u81EA\u52A8\u6362\u884C"},"en-US":{vertical:"Vertical",customSize:"Custom Size",align:"Alignment",wrap:"Auto Wrap"}}),l=(0,r.iH)("center");return(e,m)=>{let p=(0,a.up)("demo-block");return(0,a.wg)(),(0,a.iD)(a.HY,null,[(0,a.Wm)(p,{title:(0,r.SU)(t)("basicUsage")},{default:(0,a.w5)(()=>[(0,a.Wm)((0,r.SU)(i.ZP),null,{default:(0,a.w5)(()=>[(0,a.Wm)((0,r.SU)(o.ZP),{type:"primary"},{default:(0,a.w5)(()=>[(0,a.Uk)((0,u.zw)((0,r.SU)(t)("button")),1)]),_:1}),(0,a.Wm)((0,r.SU)(o.ZP),{type:"primary"},{default:(0,a.w5)(()=>[(0,a.Uk)((0,u.zw)((0,r.SU)(t)("button")),1)]),_:1}),(0,a.Wm)((0,r.SU)(o.ZP),{type:"primary"},{default:(0,a.w5)(()=>[(0,a.Uk)((0,u.zw)((0,r.SU)(t)("button")),1)]),_:1}),(0,a.Wm)((0,r.SU)(o.ZP),{type:"primary"},{default:(0,a.w5)(()=>[(0,a.Uk)((0,u.zw)((0,r.SU)(t)("button")),1)]),_:1})]),_:1})]),_:1},8,["title"]),(0,a.Wm)(p,{title:(0,r.SU)(t)("vertical")},{default:(0,a.w5)(()=>[(0,a.Wm)((0,r.SU)(i.ZP),{direction:"vertical",fill:""},{default:(0,a.w5)(()=>[(0,a.Wm)((0,r.SU)(o.ZP),{type:"primary",block:""},{default:(0,a.w5)(()=>[(0,a.Uk)((0,u.zw)((0,r.SU)(t)("button")),1)]),_:1}),(0,a.Wm)((0,r.SU)(o.ZP),{type:"primary",block:""},{default:(0,a.w5)(()=>[(0,a.Uk)((0,u.zw)((0,r.SU)(t)("button")),1)]),_:1}),(0,a.Wm)((0,r.SU)(o.ZP),{type:"primary",block:""},{default:(0,a.w5)(()=>[(0,a.Uk)((0,u.zw)((0,r.SU)(t)("button")),1)]),_:1})]),_:1})]),_:1},8,["title"]),(0,a.Wm)(p,{title:(0,r.SU)(t)("customSize")},{default:(0,a.w5)(()=>[(0,a.Wm)((0,r.SU)(i.ZP),{size:20,style:{"margin-bottom":"16px"}},{default:(0,a.w5)(()=>[(0,a.Wm)((0,r.SU)(o.ZP),{type:"primary"},{default:(0,a.w5)(()=>[(0,a.Uk)((0,u.zw)((0,r.SU)(t)("button")),1)]),_:1}),(0,a.Wm)((0,r.SU)(o.ZP),{type:"primary"},{default:(0,a.w5)(()=>[(0,a.Uk)((0,u.zw)((0,r.SU)(t)("button")),1)]),_:1}),(0,a.Wm)((0,r.SU)(o.ZP),{type:"primary"},{default:(0,a.w5)(()=>[(0,a.Uk)((0,u.zw)((0,r.SU)(t)("button")),1)]),_:1})]),_:1}),(0,a.Wm)((0,r.SU)(i.ZP),{size:"3rem"},{default:(0,a.w5)(()=>[(0,a.Wm)((0,r.SU)(o.ZP),{type:"primary"},{default:(0,a.w5)(()=>[(0,a.Uk)((0,u.zw)((0,r.SU)(t)("button")),1)]),_:1}),(0,a.Wm)((0,r.SU)(o.ZP),{type:"primary"},{default:(0,a.w5)(()=>[(0,a.Uk)((0,u.zw)((0,r.SU)(t)("button")),1)]),_:1}),(0,a.Wm)((0,r.SU)(o.ZP),{type:"primary"},{default:(0,a.w5)(()=>[(0,a.Uk)((0,u.zw)((0,r.SU)(t)("button")),1)]),_:1})]),_:1})]),_:1},8,["title"]),(0,a.Wm)(p,{title:(0,r.SU)(t)("align")},{default:(0,a.w5)(()=>[(0,a.Wm)((0,r.SU)(d.ZP),{modelValue:l.value,"onUpdate:modelValue":m[0]||(m[0]=e=>l.value=e),direction:"horizontal",style:{"margin-bottom":"16px"}},{default:(0,a.w5)(()=>[(0,a.Wm)((0,r.SU)(n.ZP),{name:"start"},{default:(0,a.w5)(()=>[(0,a.Uk)("start")]),_:1}),(0,a.Wm)((0,r.SU)(n.ZP),{name:"center"},{default:(0,a.w5)(()=>[(0,a.Uk)("center")]),_:1}),(0,a.Wm)((0,r.SU)(n.ZP),{name:"end"},{default:(0,a.w5)(()=>[(0,a.Uk)("end")]),_:1}),(0,a.Wm)((0,r.SU)(n.ZP),{name:"baseline"},{default:(0,a.w5)(()=>[(0,a.Uk)("baseline")]),_:1})]),_:1},8,["modelValue"]),(0,a.Wm)((0,r.SU)(i.ZP),{align:l.value,style:{padding:"16px",background:"#f3f2f5"}},{default:(0,a.w5)(()=>[(0,a.Wm)((0,r.SU)(o.ZP),{type:"primary"},{default:(0,a.w5)(()=>[(0,a.Uk)((0,u.zw)(l.value),1)]),_:1}),c]),_:1},8,["align"])]),_:1},8,["title"]),(0,a.Wm)(p,{title:(0,r.SU)(t)("wrap")},{default:(0,a.w5)(()=>[(0,a.Wm)((0,r.SU)(i.ZP),{wrap:""},{default:(0,a.w5)(()=>[(0,a.Wm)((0,r.SU)(o.ZP),{type:"primary",block:""},{default:(0,a.w5)(()=>[(0,a.Uk)((0,u.zw)((0,r.SU)(t)("button")),1)]),_:1}),(0,a.Wm)((0,r.SU)(o.ZP),{type:"primary",block:""},{default:(0,a.w5)(()=>[(0,a.Uk)((0,u.zw)((0,r.SU)(t)("button")),1)]),_:1}),(0,a.Wm)((0,r.SU)(o.ZP),{type:"primary",block:""},{default:(0,a.w5)(()=>[(0,a.Uk)((0,u.zw)((0,r.SU)(t)("button")),1)]),_:1}),(0,a.Wm)((0,r.SU)(o.ZP),{type:"primary",block:""},{default:(0,a.w5)(()=>[(0,a.Uk)((0,u.zw)((0,r.SU)(t)("button")),1)]),_:1}),(0,a.Wm)((0,r.SU)(o.ZP),{type:"primary",block:""},{default:(0,a.w5)(()=>[(0,a.Uk)((0,u.zw)((0,r.SU)(t)("button")),1)]),_:1}),(0,a.Wm)((0,r.SU)(o.ZP),{type:"primary",block:""},{default:(0,a.w5)(()=>[(0,a.Uk)((0,u.zw)((0,r.SU)(t)("button")),1)]),_:1}),(0,a.Wm)((0,r.SU)(o.ZP),{type:"primary",block:""},{default:(0,a.w5)(()=>[(0,a.Uk)((0,u.zw)((0,r.SU)(t)("button")),1)]),_:1}),(0,a.Wm)((0,r.SU)(o.ZP),{type:"primary",block:""},{default:(0,a.w5)(()=>[(0,a.Uk)((0,u.zw)((0,r.SU)(t)("button")),1)]),_:1})]),_:1})]),_:1},8,["title"])],64)}}}},12659:function(e,t,l){"use strict";l.d(t,{Ee:function(){return u}});var a=l("63112"),r=l("12848"),u=(0,a.n)(r.ZP);t.ZP=u},98003:function(e,t,l){"use strict";l.d(t,{Y8:function(){return u}});var a=l("63112"),r=l("58189"),u=(0,a.n)(r.Z);t.ZP=u},90844:function(e,t,l){"use strict";l.d(t,{m:function(){return d}});var a=l("80681"),r=l("11848"),u=l("78335"),i=l("12308"),o=l("20358"),n=l("96528"),d={name:u.Vg,disabled:Boolean,iconSize:u.Or,modelValue:u.Vg,checkedColor:String,labelPosition:String,labelDisabled:Boolean};t.Z=(0,a.aZ)({props:(0,i.l7)({},d,{bem:(0,u.ir)(Function),role:String,shape:String,parent:Object,checked:Boolean,bindGroup:u.J5,indeterminate:{type:Boolean,default:null}}),emits:["click","toggle"],setup(e,t){var{emit:l,slots:u}=t,i=(0,r.iH)(),d=t=>{if(e.parent&&e.bindGroup)return e.parent.props[t]},m=(0,a.Fl)(()=>{if(e.parent&&e.bindGroup){var t=d("disabled")||e.disabled;if("checkbox"===e.role){var l=d("modelValue").length,a=d("max");return t||a&&l>=+a&&!e.checked}return t}return e.disabled}),c=(0,a.Fl)(()=>d("direction")),p=(0,a.Fl)(()=>{var t=e.checkedColor||d("checkedColor");if(t&&e.checked&&!m.value)return{borderColor:t,backgroundColor:t}}),s=(0,a.Fl)(()=>e.shape||d("shape")||"round"),U=t=>{var{target:a}=t,r=i.value,u=r===a||(null==r?void 0:r.contains(a));!m.value&&(u||!e.labelDisabled)&&l("toggle"),l("click",t)},b=()=>{var t,l,{bem:r,checked:c,indeterminate:U}=e,b=e.iconSize||d("iconSize");return(0,a.Wm)("div",{ref:i,class:r("icon",[s.value,{disabled:m.value,checked:c,indeterminate:U}]),style:"dot"!==s.value?{fontSize:(0,o.Nn)(b)}:{width:(0,o.Nn)(b),height:(0,o.Nn)(b),borderColor:null===(t=p.value)||void 0===t?void 0:t.borderColor}},[u.icon?u.icon({checked:c,disabled:m.value}):"dot"!==s.value?(0,a.Wm)(n.JO,{name:U?"minus":"success",style:p.value},null):(0,a.Wm)("div",{class:r("icon--dot__icon"),style:{backgroundColor:null===(l=p.value)||void 0===l?void 0:l.backgroundColor}},null)])},S=()=>{var{checked:t}=e;if(u.default)return(0,a.Wm)("span",{class:e.bem("label",[e.labelPosition,{disabled:m.value}])},[u.default({checked:t,disabled:m.value})])};return()=>{var t="left"===e.labelPosition?[S(),b()]:[b(),S()];return(0,a.Wm)("div",{role:e.role,class:e.bem([{disabled:m.value,"label-disabled":e.labelDisabled},c.value]),tabindex:m.value?void 0:0,"aria-checked":e.checked,onClick:U},[t])}}})},12848:function(e,t,l){"use strict";l.d(t,{x7:function(){return m}}),l("82116"),l("17989"),l("86795");var a=l("80681"),r=l("62568"),u=l("78335"),i=l("22300"),[o,n]=(0,r.do)("radio-group"),d={shape:String,disabled:Boolean,iconSize:u.Or,direction:String,modelValue:u.Vg,checkedColor:String},m=Symbol(o);t.ZP=(0,a.aZ)({name:o,props:d,emits:["change","update:modelValue"],setup(e,t){var{emit:l,slots:r}=t,{linkChildren:u}=(0,i.$E)(m);return(0,a.YP)(()=>e.modelValue,e=>l("change",e)),u({props:e,updateValue:e=>l("update:modelValue",e)}),(0,i.aM)(()=>e.modelValue),()=>{var t;return(0,a.Wm)("div",{class:n([e.direction]),role:"radiogroup"},[null===(t=r.default)||void 0===t?void 0:t.call(r)])}}})},58189:function(e,t,l){"use strict";l("82116"),l("17989");var a=l("80681"),r=l("12308"),u=l("62568"),i=l("12848"),o=l("22300"),n=l("90844"),d=(0,r.l7)({},n.m,{shape:String}),[m,c]=(0,u.do)("radio");t.Z=(0,a.aZ)({name:m,props:d,emits:["update:modelValue"],setup(e,t){var{emit:l,slots:u}=t,{parent:d}=(0,o.NB)(i.x7),m=()=>(d?d.props.modelValue:e.modelValue)===e.name,p=()=>{d?d.updateValue(e.name):l("update:modelValue",e.name)};return()=>(0,a.Wm)(n.Z,(0,a.dG)({bem:c,role:"radio",parent:d,checked:m(),onToggle:p},e),(0,r.ei)(u,["default","icon"]))}})},65396:function(e,t,l){"use strict";l.r(e.exports={})},64556:function(e,t,l){"use strict";l.r(e.exports={})}}]); |