UNPKG

@form-create/iview

Version:

iview动态表单|form-create is a form generation component that can generate dynamic rendering, data collection, verification and submission functions through JSON. Supports 3 UI frameworks, and supports the generation of any Vue components. Built-in 20 kinds o

22 lines (19 loc) 603 B
import {creatorFactory} from '@form-create/core/src/index'; const name = 'input'; export default { name, maker: (function () { const maker = ['password', 'url', 'email', 'text', 'textarea'].reduce((maker, type) => { maker[type] = creatorFactory(name, {type}); return maker; }, {}); maker.idate = creatorFactory(name, {type:'date'}); return maker }()), mergeProp(ctx) { let {props} = ctx.prop; if (props.autosize && props.autosize.minRows) { props.rows = props.autosize.minRows || 2; } } }