# 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
  • submitBtn: Submit button style configuration
  • resetBtn: reset button style configuration
  • info: component prompt message configuration

# form

  • TypeObject

  • Description:Form overall display rule configuration

  • Defaults:

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

# row

  • TypeObject

  • Description:Form component layout configuration

  • Defaults:

    {
    
      gutter:0,
      type:undefined,
      align:undefined,
      justify:undefined,
      className:undefined
    
    }
    
  • Reference: Row props

# 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

# 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

# info

  • TypeObject

  • Description:Component prompt message configuration

  • Defaults:

    {
      type:"poptip"
    }
    

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

  • Reference: Poptop_props | Tooltip_props