# Global config

# Setting global configuration

  • Component mode
<form-create :option="option"></form-create>
  • Global method
Vm.$formCreate(rule,option)
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 Reference iview grid layout (opens new window)
  • submitBtn: Submit button style configuration
  • resetBtn: reset button style configuration
  • info: component prompt message configuration
  • wrap: configuration FormItem v2.5.0+

# option.form

  • TypeObject

  • Description:Form overall display rule configuration

  • Defaults:

    {
      inline:false,
      labelPosition:'right',
      labelWidth:125,
      showMessage:true,
      autocomplete:'off',
      size:undefined
    
    }
    
  • Reference: Form props (opens new window)

# option.row

  • TypeObject

  • Description:Form component layout configuration

  • Defaults:

    {
    
      gutter:0,
      type:undefined,
      align:undefined,
      justify:undefined,
      className:undefined
    
    }
    
  • Reference: Row props (opens new window)

# option.submitBtn

  • TypeObject

  • Description:Submit button style and layout configuration

  • Defaults:

    {
      type:"primary",
      size:"large",
      shape:undefined,
      long:true,
      htmlType:"button",
      disabled:false,
      icon:"ios-upload",
      innerText:"提交",
      loading:false,
      show:true,
      col:undefined
    }
    

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

  • Reference: Layout | Button_props (opens new window)

# option.resetBtn

  • TypeObject

  • Description:Reset button style and layout configuration

  • Defaults:

    {
    
      type:"ghost",
      size:"large",
      shape:undefined,
      long:true,
      htmlType:"button",
      disabled:false,
      icon:"refresh",
      innerText:"重置",
      loading:false,
      show:false,
      col:undefined
    }
    

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

  • Reference: Layout | Button_props (opens new window)

# option.info

# option.wrap v2.5.0+