Skip to content

formLayout 栅格布局

基础用法

vue
<script setup lang="ts">
import type { BasicForm } from '@/types/form'

const formConfig = reactive<BasicForm>({
  formItems: [
    {
      label: '',
      value: '',
      name: '',
      type: 'form-layout',
      children: [
        {
          label: '',
          value: '',
          name: '',
          type: 'col',
          props: {
            span: 12,
          },
          children: [
            {
              label: '字段名',
              value: '',
              name: 'field1',
              type: 'input',
            },
          ],
        },
        {
          label: '',
          value: '',
          name: '',
          type: 'col',
          props: {
            span: 12,
          },
          children: [
            {
              label: '字段名',
              value: '',
              name: 'field1',
              type: 'input',
            },
          ],
        },
      ],
    },
  ],
})
</script>