| | |
| | | |
| | | if (component.type === 'table') { |
| | | let getColumns = (cols) => { |
| | | return cols.map(item => { |
| | | return cols.filter(item => { |
| | | if (item.type === 'colspan') { |
| | | item.subcols = getColumns(item.subcols) |
| | | if (item.subcols.length === 0) { |
| | | return false |
| | | } |
| | | } else if (item.type === 'custom') { |
| | | item.elements = item.elements.map(cell => { |
| | | item.elements = item.elements.filter(cell => { |
| | | if (cell.eleType === 'button') return false |
| | | |
| | | cell = this.resetElement(cell) |
| | | return cell |
| | | }) |
| | | if (item.elements.length === 0) { |
| | | return false |
| | | } |
| | | } else { |
| | | item.IsSort = 'false' |
| | | } |
| | | |
| | | return item |
| | | return true |
| | | }) |
| | | } |
| | | component.cols = getColumns(component.cols) |