| | |
| | | } |
| | | |
| | | getWrapForms = () => { |
| | | const { wrap, action, columns, cols } = this.state.card |
| | | const { card } = this.state |
| | | |
| | | let _actions = [] |
| | | |
| | | cols.forEach(col => { |
| | | card.cols.forEach(col => { |
| | | if (col.type === 'custom') { |
| | | col.elements.forEach(cell => { |
| | | if (cell.eleType !== 'button') return |
| | |
| | | } |
| | | }) |
| | | |
| | | return getWrapForm(wrap, _actions, columns, action) |
| | | return getWrapForm(card.wrap, _actions, card.columns, card.action, card.supNodes || [], card.uuid) |
| | | } |
| | | |
| | | updateWrap = (res) => { |
| | |
| | | res.borderRadius = card.wrap.borderRadius || 0 |
| | | res.resetContrl = card.wrap.resetContrl || 'init' |
| | | |
| | | this.updateComponent({...card, wrap: res}) |
| | | let _card = {...card, wrap: res} |
| | | |
| | | if (res.supNodes) { |
| | | _card.supNodes = res.supNodes |
| | | _card.supNodes = _card.supNodes.map(item => { |
| | | item.componentId = item.nodes[item.nodes.length - 1] |
| | | return item |
| | | }) |
| | | |
| | | delete res.supNodes |
| | | } else { |
| | | delete _card.supNodes |
| | | } |
| | | |
| | | this.updateComponent(_card) |
| | | } |
| | | |
| | | updatecolumn = (config) => { |