Global config

Setting global configuration

  • Component mode
  1. <form-create :option="option"></form-create>
  • Global method
  1. Vm.$formCreate(rule,option)
  2. window.formCreate.create(rule,option)

Structure

Additional configuration items are supported in global configuration

  • form: The overall display rule configuration of the form
  • row: form component layout configuration
  • submitBtn: Submit button style configuration
  • resetBtn: reset button style configuration
  • info: component prompt message configuration

form

  • TypeObject

  • Description:Form overall display rule configuration

  • Defaults:

    1. {
    2. inline: false,
    3. labelPosition: 'right',
    4. labelSuffix: undefined,
    5. hideRequiredAsterisk: false,
    6. labelWidth: '125px',
    7. showMessage: true,
    8. inlineMessage: false,
    9. statusIcon: false,
    10. validateOnRuleChange: true,
    11. disabled: false,
    12. size: undefined,
    13. }
  • Reference: Form props

row

  • TypeObject

  • Description:Form component layout configuration

  • Defaults:

    1. {
    2. gutter: 0,
    3. type: undefined,
    4. align: undefined,
    5. justify: undefined,
    6. tag: 'div'
    7. }
  • Reference: Row props

submitBtn

  • TypeObject

  • Description:Submit button style and layout configuration

  • Defaults:

    1. {
    2. type: "primary",
    3. size: "medium",
    4. plain: false,
    5. round: false,
    6. circle: false,
    7. loading: false,
    8. disabled: false,
    9. icon: 'el-icon-upload',
    10. width: '100%',
    11. autofocus: false,
    12. nativeType: "button",
    13. innerText: "提交",
    14. show: true,
    15. col: undefined,
    16. click: undefined,
    17. }

    Submit button configuration, do not show the button when submitBtn = false or submitBtn.show = false

  • Reference: Layout | Button_props

resetBtn

  • TypeObject

  • Description:Reset button style and layout configuration

  • Defaults:

    1. {
    2. type: "default",
    3. size: "medium",
    4. plain: false,
    5. round: false,
    6. circle: false,
    7. loading: false,
    8. disabled: false,
    9. icon: 'el-icon-refresh',
    10. width: '100%',
    11. autofocus: false,
    12. nativeType: "button",
    13. innerText: "重置",
    14. show: false,
    15. col: undefined,
    16. click: undefined,
    17. }

    Reset button default configuration, displayed when resetBtn = true or resetBtn.show = true

  • Reference: Layout | Button_props

info

  • TypeObject

  • Description:Component prompt message configuration

  • Defaults:

    1. {
    2. type:"popover"
    3. }

    The properties of the prompt component can be set in the info configuration item

  • Reference: Popover_props | Tooltip_props