import{ax as t,al as l,z as p,A as e,b5 as r,R as h,B as i,O as a}from"./chunks/framework.V2ssSR2R.js";const D=JSON.parse('{"title":"布局","description":"","frontmatter":{},"headers":[],"relativePath":"form-config/layout.md","filePath":"form-config/layout.md"}'),d={name:"form-config/layout.md"};function g(F,s,E,y,C,A){const n=l("demo-block");return e(),p("div",null,[s[0]||(s[0]=r("",4)),h(n,{type:"form",config:[{name:"text",text:"配置1"},{name:"text2",text:"配置2"},{name:"text3",text:"配置3"}]}),s[1]||(s[1]=i("h2",{id:"行内布局",tabindex:"-1"},[a("行内布局 "),i("a",{class:"header-anchor",href:"#行内布局","aria-label":"Permalink to “行内布局”"},"​")],-1)),s[2]||(s[2]=i("p",null,"可以通过配置span,来指定行内的配置项占用多少位置,一行为24,例如一行要显示三个配置则 span 可以配置 8;四个则为 6。默认会自动调节在一行中显示。",-1)),h(n,{type:"form",config:[{type:"row",labelWidth:"100px",span:8,items:[{name:"text",text:"配置1"},{name:"text2",text:"配置2"},{name:"text3",text:"配置3"}]},{type:"row",span:12,labelWidth:"100px",items:[{name:"text4",text:"配置1"},{name:"text5",text:"配置2"},{name:"text6",text:"配置3"}]}]}),s[3]||(s[3]=i("h2",{id:"混合布局",tabindex:"-1"},[a("混合布局 "),i("a",{class:"header-anchor",href:"#混合布局","aria-label":"Permalink to “混合布局”"},"​")],-1)),h(n,{type:"form",config:[{name:"text0",labelWidth:"100px",text:"配置0"},{type:"row",labelWidth:"100px",items:[{name:"text",text:"配置1"},{name:"text2",text:"配置2"},{name:"text3",text:"配置3"}]}]}),s[4]||(s[4]=i("h2",{id:"对象容器",tabindex:"-1"},[a("对象容器 "),i("a",{class:"header-anchor",href:"#对象容器","aria-label":"Permalink to “对象容器”"},"​")],-1)),s[5]||(s[5]=i("h3",{id:"object",tabindex:"-1"},[a("Object "),i("a",{class:"header-anchor",href:"#object","aria-label":"Permalink to “Object”"},"​")],-1)),h(n,{type:"form",config:[{name:"data",items:[{name:"text2",text:"配置2"},{name:"text3",text:"配置3"}]}]}),s[6]||(s[6]=i("h3",{id:"fieldset",tabindex:"-1"},[a("fieldset "),i("a",{class:"header-anchor",href:"#fieldset","aria-label":"Permalink to “fieldset”"},"​")],-1)),h(n,{type:"form",config:[{type:"fieldset",labelWidth:"100px",legend:"fieldset",items:[{name:"text",text:"配置1"},{type:"row",items:[{name:"text2",text:"配置2"},{name:"text3",text:"配置3"}]}]}]}),s[7]||(s[7]=i("p",null,[i("code",null,"legend"),a(" 除了支持字符串,也支持函数,函数返回值作为标题展示,可根据表单数据动态生成:")],-1)),h(n,{type:"form",config:[{type:"fieldset",labelWidth:"100px",legend:(o,{formValue:k})=>`当前值:${k.text||"空"}`,items:[{name:"text",text:"配置1"}]}]},null,8,["config"]),s[8]||(s[8]=i("h3",{id:"panel",tabindex:"-1"},[a("panel "),i("a",{class:"header-anchor",href:"#panel","aria-label":"Permalink to “panel”"},"​")],-1)),h(n,{type:"form",config:[{type:"panel",title:"panel",items:[{name:"text",text:"配置1"},{type:"row",items:[{name:"text2",text:"配置2"},{name:"text3",text:"配置3"}]}]}]}),s[9]||(s[9]=i("h3",{id:"tabs",tabindex:"-1"},[a("tabs "),i("a",{class:"header-anchor",href:"#tabs","aria-label":"Permalink to “tabs”"},"​")],-1)),h(n,{type:"form",config:[{type:"tab",items:[{title:"tab1",items:[{name:"text",text:"配置1"}]},{title:"tab2",items:[{name:"text2",text:"配置2"},{name:"text3",text:"配置3"}]}]}]}),s[10]||(s[10]=i("h2",{id:"数组容器",tabindex:"-1"},[a("数组容器 "),i("a",{class:"header-anchor",href:"#数组容器","aria-label":"Permalink to “数组容器”"},"​")],-1)),s[11]||(s[11]=i("h3",{id:"grouplist",tabindex:"-1"},[a("groupList "),i("a",{class:"header-anchor",href:"#grouplist","aria-label":"Permalink to “groupList”"},"​")],-1)),h(n,{type:"form",config:[{type:"groupList",name:"group",items:[{name:"text",text:"配置1"},{type:"row",items:[{name:"text2",text:"配置2"},{name:"text3",text:"配置3"}]}]}]}),s[12]||(s[12]=i("h3",{id:"table",tabindex:"-1"},[a("table "),i("a",{class:"header-anchor",href:"#table","aria-label":"Permalink to “table”"},"​")],-1)),h(n,{type:"form",config:[{type:"table",name:"table",items:[{name:"text",label:"配置1"}]}]}),s[13]||(s[13]=i("h3",{id:"step",tabindex:"-1"},[a("step "),i("a",{class:"header-anchor",href:"#step","aria-label":"Permalink to “step”"},"​")],-1)),h(n,{type:"form",config:[{type:"step",items:[{title:"步骤1",items:[{name:"text",text:"配置1"}]},{title:"步骤2",items:[{name:"text2",text:"配置2"}]}]}]}),s[14]||(s[14]=i("h3",{id:"flex-layout",tabindex:"-1"},[a("flex-layout "),i("a",{class:"header-anchor",href:"#flex-layout","aria-label":"Permalink to “flex-layout”"},"​")],-1)),h(n,{type:"form",config:[{type:"flex-layout",gap:"20px",items:[{name:"text",text:"配置1",span:12},{name:"text2",text:"配置2",span:12}]}]})])}const c=t(d,[["render",g]]);export{D as __pageData,c as default};