1 |
- System.register(["./index-legacy-e1ea41b7.js"],(function(e,t){"use strict";var r,o,n,i,s,a,c,d,l,u,g,p,b,v,f,m,x,S,h;return{setters:[e=>{r=e.c,o=e.t,n=e.n,i=e.b,s=e.d,a=e.aa,c=e.a,d=e.o,l=e.ap,u=e.k,g=e.ac,p=e.aq,b=e.ad,v=e.ar,f=e.e,m=e.as,x=e.h,S=e.at,h=e.I}],execute:function(){const[t,q]=r("grid"),P={square:Boolean,center:o,border:o,gutter:n,reverse:Boolean,iconSize:n,direction:String,clickable:Boolean,columnNum:i(4)},k=Symbol(t);var y=s({name:t,props:P,setup(e,{slots:t}){const{linkChildren:r}=a(k);return r({props:e}),()=>{var r;return c("div",{style:{paddingLeft:d(e.gutter)},class:[q(),{[l]:e.border&&!e.gutter}]},[null==(r=t.default)?void 0:r.call(t)])}}});e("G",u(y));const[B,C]=r("grid-item"),z=g({},p,{dot:Boolean,text:String,icon:String,badge:n,iconColor:String,iconPrefix:String,badgeProps:Object});var G=s({name:B,props:z,setup(e,{slots:t}){const{parent:r,index:o}=b(k),n=v();if(!r)return void console.error("[Vant] <GridItem> must be a child component of <Grid>.");const i=f((()=>{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=d(t);s.paddingRight=e,o.value>=+n&&(s.marginTop=e)}return s})),s=f((()=>{const{square:e,gutter:t}=r.props;if(e&&t){const e=d(t);return{right:e,bottom:e,height:"auto"}}}));return()=>{const{center:o,border:a,square:d,gutter:l,reverse:u,direction:g,clickable:p}=r.props,b=[C("content",[g,{center:o,square:d,reverse:u,clickable:p,surround:a&&l}]),{[m]:a}];return c("div",{class:[C({square:d})],style:i.value},[c("div",{role:p?"button":void 0,class:b,style:s.value,tabindex:p?0:void 0,onClick:n},[t.default?t.default():[t.icon?c(S,x({dot:e.dot,content:e.badge},e.badgeProps),{default:t.icon}):e.icon?c(h,{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?c("span",{class:C("text")},[e.text]):void 0]])])}}});e("a",u(G))}}}));
|