| | |
| | | if (component.search) component.search = [] |
| | | component.data = [] // 初始化数据为空 |
| | | |
| | | if (component.type === 'table' && component.subtype === 'normaltable') { |
| | | if (component.subtype === 'tablecard') { // 兼容 |
| | | component.type = 'card' |
| | | } |
| | | |
| | | if (component.type === 'table') { |
| | | let getColumns = (cols) => { |
| | | return cols.map(item => { |
| | | if (item.type === 'colspan') { |
| | |
| | | <PropCard config={item} initdata={item.data} mainSearch={[]} /> |
| | | </Col> |
| | | ) |
| | | } else if (item.type === 'table' && item.subtype === 'tablecard') { |
| | | } else if (item.type === 'card' && item.subtype === 'tablecard') { |
| | | return ( |
| | | <Col span={item.width} key={item.uuid}> |
| | | <TableCard config={item} initdata={item.data} mainSearch={[]}/> |