createAllocation.txt function createAllocation(data){ if (A.isArray(data.input)) { let profile = {}, P, inputs = data.input const def = { id: '', name: 'noname', type: 'text', value: '', placehold: '' } O.keys(data).forEach( item = { if (it
function createAllocation(data){ if (A.isArray(data.input)) { let profile = {}, P, inputs = data.input const def = { id: '', name: 'noname', type: 'text', value: '', placehold: '' } O.keys(data).forEach( item => { if (item!='input') profile[item] = data[item] }) return inputs.map( input => { P = _.extend( def, (input.props||input)) P.attr = { title: profile.title||P.title||'', desc: profile.desc||P.desc||'', className: (profile.itemClass||P.itemClass) ? 'inputItem '+(profile.itemClass||P.itemClass) : 'inputItem' } if (P.union){ P.target = { id: P.id, name: P.name, type: P.type, } } }) } return data }