Maker

The maker component generator is a helper method for generating component rules, which can quickly generate corresponding component rules through chain operations.

Get maker

Browser

window.formCreate.maker

NodeJs

  • iview

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

  • elementUI

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

Maker.parse

  • Parameter{string|array} Json{bool} toMaker=false

  • Usage

    1. let rules = maker.parse(json);
    2. let rule = rules.find(field);
    3. rule.value = 'value';
    4. rule.event.click = function(){
    5. //TODO
    6. }

    Convert the json into a generation rule. After conversion, you can use the find () method to quickly find the specified field.

Build component