How to use the @form-create/utils.isNumeric function in @form-create/utils

To help you get started, we’ve selected a few @form-create/utils examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github xaboy / form-create / packages / core / src2 / factory / handler.js View on Github external
function parseCol(col) {
    if (isNumeric(col)) {
        return {span: col};
    } else if (col.span === undefined) $set(col, 'span', 24);

    return col;
}
github xaboy / form-create / packages / element-ui / src / form.js View on Github external
makeFormItem({type, rule, unique, field, refName}, VNodeFn, fItemUnique) {
        let labelWidth = (!componentList[type] && !rule.col.labelWidth && !rule.title) ? 1 : rule.col.labelWidth;
        labelWidth = isNumeric(labelWidth) ? labelWidth + 'px' : labelWidth;
        let className = rule.className, propsData = this.vData.props({
                prop: field,
                label: rule.title,
                labelFor: unique,
                rules: rule.validate,
                labelWidth: labelWidth,
                required: rule.props.required
            }).key(fItemUnique).ref('fItem' + refName).class(className).get(),
            node = this.vNode.formItem(propsData, VNodeFn);
        return this.propsData.props.inline === true ? [node] : this.makeCol(rule, fItemUnique, [node])
    }