Skip to content
On this page

Form 表单

通过配置自动生成表单页面

基础使用

</>

ProForm Attributes

如需查看 ProForm 的 Form 属性,请参考:element-ui

属性说明类型可选值默认值
config表单基础配置Object-{}
list组件的配置Object-{}

JSON Schema

config: {
    labelWidth: '80px',
    labelPosition: 'left',
    size: 'small',
    inline: false
  },
  list: {
    formOne: {
      formTitle: '基本信息',
      formTitleIcon: 'el-icon-lollipop',
      formTitleClass: '',
      formCol: { span: 24 },
      formItems: {
        input_key: {
          type: 'Input',
          label: '测试输入框',
          options: {
            placeholder: '请输入',
            clearable: true,
            prefixIcon: 'el-icon-user-solid',
            col: { span: 12 },
            value: ''
          },
          formItemOptions: {
            label: '姓名',
            col: { span: 12 }, // form-item所占格数
            slotAfter: '测试的文字', // form-item后置提示文案
            isHidden: false, // 是否隐藏form-item
            rules: [
              {
                required: true,
                message: '必填!'
              }
            ]
          }
        }
      }
    }
  }

fzui-design