import{o as t,h as e,w as s,X as a,A as r,W as u,z as i}from"./index-Dnh6GPlT.js";import{_ as n}from"./_plugin-vue_export-helper.BCo6x5W8.js";const l="uni-col";const p=n({name:"uniCol",props:{span:{type:Number,default:24},offset:{type:Number,default:-1},pull:{type:Number,default:-1},push:{type:Number,default:-1},xs:[Number,Object],sm:[Number,Object],md:[Number,Object],lg:[Number,Object],xl:[Number,Object]},data:()=>({gutter:0,sizeClass:"",parentWidth:0,nvueWidth:0,marginLeft:0,right:0,left:0}),created(){let t=this.$parent;for(;t&&"uniRow"!==t.$options.componentName;)t=t.$parent;this.updateGutter(t.gutter),t.$watch("gutter",(t=>{this.updateGutter(t)}))},computed:{sizeList(){let{span:t,offset:e,pull:s,push:a}=this;return{span:t,offset:e,pull:s,push:a}},pointClassList(){let t=[];return["xs","sm","md","lg","xl"].forEach((e=>{const s=this[e];"number"==typeof s?t.push(`${l}-${e}-${s}`):"object"==typeof s&&s&&Object.keys(s).forEach((a=>{t.push("span"===a?`${l}-${e}-${s[a]}`:`${l}-${e}-${a}-${s[a]}`)}))})),t.join(" ")}},methods:{updateGutter(t){t=Number(t),isNaN(t)||(this.gutter=t/2)}},watch:{sizeList:{immediate:!0,handler(t){let e=[];for(let s in t){const a=t[s];!a&&0!==a||-1===a||e.push("span"===s?`${l}-${a}`:`${l}-${s}-${a}`)}this.sizeClass=e.join(" ")}}}},[["render",function(n,l,p,o,f,m){const d=i;return t(),e(d,{class:r(["uni-col",f.sizeClass,m.pointClassList]),style:u({paddingLeft:`${Number(f.gutter)}rpx`,paddingRight:`${Number(f.gutter)}rpx`})},{default:s((()=>[a(n.$slots,"default",{},void 0,!0)])),_:3},8,["class","style"])}],["__scopeId","data-v-84ac5f6d"]]),o="uni-row",f="--";const m=n({name:"uniRow",componentName:"uniRow",props:{type:String,gutter:Number,justify:{type:String,default:"start"},align:{type:String,default:"top"},width:{type:[String,Number],default:750}},created(){},computed:{marginValue(){return this.gutter?-this.gutter/2:0},typeClass(){return"flex"===this.type?`${o+f}flex`:""},justifyClass(){return"start"!==this.justify?`${o+f}flex-justify-${this.justify}`:""},alignClass(){return"top"!==this.align?`${o+f}flex-align-${this.align}`:""}}},[["render",function(n,l,p,o,f,m){const d=i;return t(),e(d,{class:r(["uni-row",m.typeClass,m.justifyClass,m.alignClass]),style:u({marginLeft:`${Number(m.marginValue)}rpx`,marginRight:`${Number(m.marginValue)}rpx`})},{default:s((()=>[a(n.$slots,"default",{},void 0,!0)])),_:3},8,["class","style"])}],["__scopeId","data-v-9ff25b7f"]]);export{p as _,m as a};
