You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
2 lines
2.1 KiB
2 lines
2.1 KiB
import{k as g,d as p,u as _,e as o,y as S,o as $,c as h,w,r as v,n as j,a as c,g as N,X as C,h as x,G as u,p as O,S as b,I as K}from"./index-7ed2d026.js";import{_ as E,m as r}from"./el-button-e2db9d24.js";const R=Symbol("rowContextKey"),k=["start","center","end","space-around","space-between","space-evenly"],P=["top","middle","bottom"],B=g({tag:{type:String,default:"div"},gutter:{type:Number,default:0},justify:{type:String,values:k,default:"start"},align:{type:String,values:P}}),I=p({name:"ElRow"}),L=p({...I,props:B,setup(f){const e=f,l=_("row"),a=o(()=>e.gutter);S(R,{gutter:a});const i=o(()=>{const t={};return e.gutter&&(t.marginRight=t.marginLeft=`-${e.gutter/2}px`),t}),d=o(()=>[l.b(),l.is(`justify-${e.justify}`,e.justify!=="start"),l.is(`align-${e.align}`,!!e.align)]);return(t,m)=>($(),h(C(t.tag),{class:j(c(d)),style:N(c(i))},{default:w(()=>[v(t.$slots,"default")]),_:3},8,["class","style"]))}});var A=E(L,[["__file","row.vue"]]);const H=x(A),D=g({tag:{type:String,default:"div"},span:{type:Number,default:24},offset:{type:Number,default:0},pull:{type:Number,default:0},push:{type:Number,default:0},xs:{type:u([Number,Object]),default:()=>r({})},sm:{type:u([Number,Object]),default:()=>r({})},md:{type:u([Number,Object]),default:()=>r({})},lg:{type:u([Number,Object]),default:()=>r({})},xl:{type:u([Number,Object]),default:()=>r({})}}),G=p({name:"ElCol"}),J=p({...G,props:D,setup(f){const e=f,{gutter:l}=O(R,{gutter:o(()=>0)}),a=_("col"),i=o(()=>{const t={};return l.value&&(t.paddingLeft=t.paddingRight=`${l.value/2}px`),t}),d=o(()=>{const t=[];return["span","offset","pull","push"].forEach(s=>{const n=e[s];b(n)&&(s==="span"?t.push(a.b(`${e[s]}`)):n>0&&t.push(a.b(`${s}-${e[s]}`)))}),["xs","sm","md","lg","xl"].forEach(s=>{b(e[s])?t.push(a.b(`${s}-${e[s]}`)):K(e[s])&&Object.entries(e[s]).forEach(([n,y])=>{t.push(n!=="span"?a.b(`${s}-${n}-${y}`):a.b(`${s}-${y}`))})}),l.value&&t.push(a.is("guttered")),[a.b(),t]});return(t,m)=>($(),h(C(t.tag),{class:j(c(d)),style:N(c(i))},{default:w(()=>[v(t.$slots,"default")]),_:3},8,["class","style"]))}});var T=E(J,[["__file","col.vue"]]);const M=x(T);export{M as E,H as a};
|