index-legacy-fe92801f.js 1.9 KB

1
  1. System.register(["./index-legacy-e6be1dcb.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.ab,c=e.a,d=e.o,l=e.b4,u=e.k,g=e.ad,p=e.b5,b=e.ae,v=e.b6,f=e.e,m=e.b7,x=e.h,S=e.b8,h=e.I}],execute:function(){const[t,P]=r("grid"),k={square:Boolean,center:o,border:o,gutter:n,reverse:Boolean,iconSize:n,direction:String,clickable:Boolean,columnNum:i(4)},q=Symbol(t);var y=s({name:t,props:k,setup(e,{slots:t}){const{linkChildren:r}=a(q);return r({props:e}),()=>{var r;return c("div",{style:{paddingLeft:d(e.gutter)},class:[P(),{[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(q),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))}}}));