| | |
| | | MKEmitter.removeListener('completeSave', this.completeSave) |
| | | } |
| | | |
| | | // updateFix = (card) => { |
| | | // let fixs = {} |
| | | |
| | | // card.cols.forEach(col => { |
| | | // if (!col.field) return |
| | | // if (col.postfix || col.prefix) { |
| | | // fixs[col.field] = col |
| | | // } |
| | | // }) |
| | | |
| | | // card.cols.forEach(col => { |
| | | // if (col.type === 'custom') { |
| | | // col.elements.forEach(cell => { |
| | | // if (cell.datatype === 'dynamic') { |
| | | // cell.height = '' |
| | | // cell.innerHeight = 'auto' |
| | | |
| | | // if (fixs[cell.field]) { |
| | | // if (!cell.prefix && fixs[cell.field].prefix) { |
| | | // cell.prefix = fixs[cell.field].prefix |
| | | // } |
| | | // if (!cell.postfix && fixs[cell.field].postfix) { |
| | | // cell.postfix = fixs[cell.field].postfix |
| | | // } |
| | | // } |
| | | // } |
| | | // }) |
| | | // } |
| | | // }) |
| | | |
| | | // return card |
| | | // } |
| | | |
| | | completeSave = () => { |
| | | const { card } = this.state |
| | | |
| | |
| | | let _actions = [...action] |
| | | |
| | | cols.forEach(col => { |
| | | if (col.type !== 'action') return |
| | | _actions.push(...col.elements) |
| | | if (col.type === 'custom') { |
| | | col.elements.forEach(cell => { |
| | | if (cell.eleType !== 'button') return |
| | | |
| | | _actions.push(cell) |
| | | }) |
| | | } |
| | | }) |
| | | |
| | | return getWrapForm(wrap, _actions, columns) |