index-legacy.761bf286.js 1.9 KB

1
  1. System.register(["./index-legacy.eb062188.js"],(function(e){"use strict";var t,r,o,n,i,s,a,c,l,d,u,g,p,b,v,f,m,x,S;return{setters:[function(e){t=e.t,r=e.v,o=e.z,n=e.w,i=e.d,s=e.x,a=e.c,c=e.U,l=e.bl,d=e.D,u=e.N,g=e.ae,p=e.C,b=e.af,v=e.y,f=e.bm,m=e.E,x=e.aT,S=e.a5}],execute:function(){const[y,P]=t("grid"),h={square:Boolean,center:r,border:r,gutter:o,reverse:Boolean,iconSize:o,direction:String,clickable:Boolean,columnNum:n(4)},q=Symbol(y);var k=i({name:y,props:h,setup(e,{slots:t}){const{linkChildren:r}=s(q);return r({props:e}),()=>{var r;return a("div",{style:{paddingLeft:c(e.gutter)},class:[P(),{[l]:e.border&&!e.gutter}]},[null==(r=t.default)?void 0:r.call(t)])}}});e("G",d(k));const[B,C]=t("grid-item"),z=u({},g,{dot:Boolean,text:String,icon:String,badge:o,iconColor:String,iconPrefix:String,badgeProps:Object});var G=i({name:B,props:z,setup(e,{slots:t}){const{parent:r,index:o}=p(q),n=b();if(!r)return void console.error("[Vant] <GridItem> must be a child component of <Grid>.");const i=v((()=>{const{square:e,gutter:t,columnNum:n}=r.props,i=100/+n+"%",s={flexBasis:i};if(e)s.paddingTop=i;else if(t){const e=c(t);s.paddingRight=e,o.value>=+n&&(s.marginTop=e)}return s})),s=v((()=>{const{square:e,gutter:t}=r.props;if(e&&t){const e=c(t);return{right:e,bottom:e,height:"auto"}}}));return()=>{const{center:o,border:c,square:l,gutter:d,reverse:u,direction:g,clickable:p}=r.props,b=[C("content",[g,{center:o,square:l,reverse:u,clickable:p,surround:c&&d}]),{[f]:c}];return a("div",{class:[C({square:l})],style:i.value},[a("div",{role:p?"button":void 0,class:b,style:s.value,tabindex:p?0:void 0,onClick:n},[t.default?t.default():[t.icon?a(x,m({dot:e.dot,content:e.badge},e.badgeProps),{default:t.icon}):e.icon?a(S,{dot:e.dot,name:e.icon,size:r.props.iconSize,badge:e.badge,class:C("icon"),color:e.iconColor,badgeProps:e.badgeProps,classPrefix:e.iconPrefix},null):void 0,t.text?t.text():e.text?a("span",{class:C("text")},[e.text]):void 0]])])}}});e("a",d(G))}}}));