mirror of
https://github.com/Tencent/tmagic-editor.git
synced 2026-08-01 02:45:49 +00:00
1 line
4.7 KiB
JavaScript
1 line
4.7 KiB
JavaScript
import{At as e,E as t,Mt as n,Ot as r,Tt as i,Xt as a,en as o,jt as s}from"./chunks/framework.ECw2lWOt.js";var c=JSON.parse(`{"title":"布局","description":"","frontmatter":{},"headers":[],"relativePath":"form-config/layout.md","filePath":"form-config/layout.md"}`),l={name:`form-config/layout.md`};function u(t,c,l,u,d,f){let p=o(`demo-block`);return a(),r(`div`,null,[c[0]||=e("",4),n(p,{type:`form`,config:[{name:`text`,text:`配置1`},{name:`text2`,text:`配置2`},{name:`text3`,text:`配置3`}]}),c[1]||=i(`h2`,{id:`行内布局`,tabindex:`-1`},[s(`行内布局 `),i(`a`,{class:`header-anchor`,href:`#行内布局`,"aria-label":`Permalink to “行内布局”`},``)],-1),c[2]||=i(`p`,null,`可以通过配置span,来指定行内的配置项占用多少位置,一行为24,例如一行要显示三个配置则 span 可以配置 8;四个则为 6。默认会自动调节在一行中显示。`,-1),n(p,{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`}]}]}),c[3]||=i(`h2`,{id:`混合布局`,tabindex:`-1`},[s(`混合布局 `),i(`a`,{class:`header-anchor`,href:`#混合布局`,"aria-label":`Permalink to “混合布局”`},``)],-1),n(p,{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`}]}]}),c[4]||=i(`h2`,{id:`对象容器`,tabindex:`-1`},[s(`对象容器 `),i(`a`,{class:`header-anchor`,href:`#对象容器`,"aria-label":`Permalink to “对象容器”`},``)],-1),c[5]||=i(`h3`,{id:`object`,tabindex:`-1`},[s(`Object `),i(`a`,{class:`header-anchor`,href:`#object`,"aria-label":`Permalink to “Object”`},``)],-1),n(p,{type:`form`,config:[{name:`data`,items:[{name:`text2`,text:`配置2`},{name:`text3`,text:`配置3`}]}]}),c[6]||=i(`h3`,{id:`fieldset`,tabindex:`-1`},[s(`fieldset `),i(`a`,{class:`header-anchor`,href:`#fieldset`,"aria-label":`Permalink to “fieldset”`},``)],-1),n(p,{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`}]}]}]}),c[7]||=i(`p`,null,[i(`code`,null,`legend`),s(` 除了支持字符串,也支持函数,函数返回值作为标题展示,可根据表单数据动态生成:`)],-1),n(p,{type:`form`,config:[{type:`fieldset`,labelWidth:`100px`,legend:(e,{formValue:t})=>`当前值:${t.text||`空`}`,items:[{name:`text`,text:`配置1`}]}]},null,8,[`config`]),c[8]||=i(`h3`,{id:`panel`,tabindex:`-1`},[s(`panel `),i(`a`,{class:`header-anchor`,href:`#panel`,"aria-label":`Permalink to “panel”`},``)],-1),n(p,{type:`form`,config:[{type:`panel`,title:`panel`,items:[{name:`text`,text:`配置1`},{type:`row`,items:[{name:`text2`,text:`配置2`},{name:`text3`,text:`配置3`}]}]}]}),c[9]||=i(`h3`,{id:`tabs`,tabindex:`-1`},[s(`tabs `),i(`a`,{class:`header-anchor`,href:`#tabs`,"aria-label":`Permalink to “tabs”`},``)],-1),n(p,{type:`form`,config:[{type:`tab`,items:[{title:`tab1`,items:[{name:`text`,text:`配置1`}]},{title:`tab2`,items:[{name:`text2`,text:`配置2`},{name:`text3`,text:`配置3`}]}]}]}),c[10]||=i(`h2`,{id:`数组容器`,tabindex:`-1`},[s(`数组容器 `),i(`a`,{class:`header-anchor`,href:`#数组容器`,"aria-label":`Permalink to “数组容器”`},``)],-1),c[11]||=i(`h3`,{id:`grouplist`,tabindex:`-1`},[s(`groupList `),i(`a`,{class:`header-anchor`,href:`#grouplist`,"aria-label":`Permalink to “groupList”`},``)],-1),n(p,{type:`form`,config:[{type:`groupList`,name:`group`,items:[{name:`text`,text:`配置1`},{type:`row`,items:[{name:`text2`,text:`配置2`},{name:`text3`,text:`配置3`}]}]}]}),c[12]||=i(`h3`,{id:`table`,tabindex:`-1`},[s(`table `),i(`a`,{class:`header-anchor`,href:`#table`,"aria-label":`Permalink to “table”`},``)],-1),n(p,{type:`form`,config:[{type:`table`,name:`table`,items:[{name:`text`,label:`配置1`}]}]}),c[13]||=i(`h3`,{id:`step`,tabindex:`-1`},[s(`step `),i(`a`,{class:`header-anchor`,href:`#step`,"aria-label":`Permalink to “step”`},``)],-1),n(p,{type:`form`,config:[{type:`step`,items:[{title:`步骤1`,items:[{name:`text`,text:`配置1`}]},{title:`步骤2`,items:[{name:`text2`,text:`配置2`}]}]}]}),c[14]||=i(`h3`,{id:`flex-layout`,tabindex:`-1`},[s(`flex-layout `),i(`a`,{class:`header-anchor`,href:`#flex-layout`,"aria-label":`Permalink to “flex-layout”`},``)],-1),n(p,{type:`form`,config:[{type:`flex-layout`,gap:`20px`,items:[{name:`text`,text:`配置1`,span:12},{name:`text2`,text:`配置2`,span:12}]}]})])}var d=t(l,[[`render`,u]]);export{c as __pageData,d as default}; |