Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function parseCol(col) {
if (isNumeric(col)) {
return {span: col};
} else if (col.span === undefined) $set(col, 'span', 24);
return col;
}
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])
}