import{_ as a,b as l,d as e,p as t,w as i,i as n,o as s,f as d,k as u,a4 as o,C as r}from"./index-2PZN6pGH.js";import{_ as c}from"./uni-card.CpdfOoXJ.js";import{_ as m}from"./uni-data-checkbox.CJSNfC7D.js";import{_ as f}from"./uni-section.BISPxi99.js";import"./uni-load-more.BMea_02e.js";const p=a({data:()=>({paddingClass:"uni-pa-5",marginClass:"uni-ma-5",formData:{margin:["t","r","l","b"],marginSize:"5",padding:["t","r","l","b"],paddingSize:"5"},directionData:[{value:"t",text:"上"},{value:"r",text:"右"},{value:"b",text:"下"},{value:"l",text:"左"}],sizeData:[{value:"0",text:"0"},{value:"2",text:"4px"},{value:"5",text:"10px"},{value:"10",text:"20px"}]}),onLoad(){},methods:{change(a,l){let{margin:e,marginSize:t,padding:i,paddingSize:n}=this.formData;this.marginClass="",this.paddingClass="",e.forEach((a=>{this.marginClass+=`uni-m${a}-${t} `})),i.forEach((a=>{this.marginClass+=`uni-p${a}-${n} `}))}}},[["render",function(a,p,g,_,h,b){const x=r,D=n,C=l(e("uni-card"),c),z=l(e("uni-data-checkbox"),m),V=l(e("uni-section"),f);return s(),t(D,{class:"container"},{default:i((()=>[d(C,{"is-shadow":!1,"is-full":""},{default:i((()=>[d(D,{class:"header"},{default:i((()=>[d(x,{class:"uni-h6"},{default:i((()=>[u("使用间距辅助类对元素快速应用")])),_:1}),u(),d(x,{class:"uni-primary uni-px-3 uni-h6"},{default:i((()=>[u("margin")])),_:1}),d(x,{class:"uni-h6"},{default:i((()=>[u(" 或 ")])),_:1}),d(x,{class:"uni-primary uni-px-3 uni-h6"},{default:i((()=>[u("padding")])),_:1}),u(),d(x,{class:"uni-h6"},{default:i((()=>[u("样式， 范围是从 0 到 16。")])),_:1})])),_:1}),d(D,{class:"header uni-mt-5"},{default:i((()=>[d(x,{class:"uni-h6"},{default:i((()=>[u("规则为")])),_:1}),u(),d(x,{class:"uni-primary uni-pl-3 uni-h6"},{default:i((()=>[u("uni-${property}${direction}-${size}")])),_:1})])),_:1}),d(D,{class:"uni-mt-5"},{default:i((()=>[d(x,{class:"uni-h6"},{default:i((()=>[u("各值的含义请参考文档")])),_:1})])),_:1})])),_:1}),d(V,{title:"效果展示",type:"line"},{default:i((()=>[d(D,{class:"margin"},{default:i((()=>[d(D,{class:o(["margin-item uni-border-4-bg",[h.paddingClass,h.marginClass]])},{default:i((()=>[d(D,{class:"box uni-primary-bg"},{default:i((()=>[d(x,{class:"uni-white uni-body"},{default:i((()=>[u("通过下面的选项控制边距")])),_:1})])),_:1})])),_:1},8,["class"])])),_:1}),d(D,{class:"actions uni-mt-10"},{default:i((()=>[d(x,{class:"action-label"},{default:i((()=>[u("外边距")])),_:1}),d(z,{modelValue:h.formData.margin,"onUpdate:modelValue":p[0]||(p[0]=a=>h.formData.margin=a),multiple:"",localdata:h.directionData,onChange:p[1]||(p[1]=a=>b.change(a,1))},null,8,["modelValue","localdata"])])),_:1}),d(D,{class:"actions uni-mt-3 uni-mb-10"},{default:i((()=>[d(x,{class:"action-label"},{default:i((()=>[u("外边距大小")])),_:1}),d(z,{modelValue:h.formData.marginSize,"onUpdate:modelValue":p[2]||(p[2]=a=>h.formData.marginSize=a),localdata:h.sizeData,onChange:p[3]||(p[3]=a=>b.change(a,1))},null,8,["modelValue","localdata"])])),_:1}),d(D,{class:"actions"},{default:i((()=>[d(x,{class:"action-label"},{default:i((()=>[u("内边距")])),_:1}),d(z,{modelValue:h.formData.padding,"onUpdate:modelValue":p[4]||(p[4]=a=>h.formData.padding=a),multiple:"",localdata:h.directionData,onChange:p[5]||(p[5]=a=>b.change(a,2))},null,8,["modelValue","localdata"])])),_:1}),d(D,{class:"actions uni-mt-3 uni-mb-10"},{default:i((()=>[d(x,{class:"action-label"},{default:i((()=>[u("内边距大小")])),_:1}),d(z,{modelValue:h.formData.paddingSize,"onUpdate:modelValue":p[6]||(p[6]=a=>h.formData.paddingSize=a),localdata:h.sizeData,onChange:p[7]||(p[7]=a=>b.change(a,3))},null,8,["modelValue","localdata"])])),_:1})])),_:1})])),_:1})}],["__scopeId","data-v-7ef4aba0"]]);export{p as default};
