# Maker

The maker component generator is an assistant method used to generate component rules, and the corresponding component rules can be quickly generated through chain operations

# Get the Maker

Browser

window.formCreate.maker

NodeJs

  • iview

    import { maker } from '@form-create/iview'

  • element-ui

    import { maker } from '@form-create/element-ui'

  • ant-design-vue

    import { maker } from '@form-create/ant-design-vue'

# Example

# maker.create

Generate custom components

  • Parameters

    • {string} tab Component name/Tag name
    • {string} field
    • {string} title
  • Using

    formCreate.maker.create('i-button','btn','title')
    

# maker.template

Generate custom templates, Not recommended

  • Parameters

    • {string} template
    • {Vue} vm
    • {string} field = undefined
    • {string} title = undefined
  • Using

    formCreate.maker.template('<i-button></i-button>',() => new Vue,'btn','title')
    

# Generate components