| | |
| | | // eslint-disable-next-line |
| | | content = eval(content) |
| | | } catch (e) { |
| | | if (window.debugger) { |
| | | console.info(content) |
| | | console.warn(e) |
| | | } |
| | | content = '' |
| | | } |
| | | |
| | | if (col.round && typeof(content) === 'number') { |
| | | content = Math.round(content * col.round) / col.round |
| | | content = content.toFixed(col.decimal) |
| | | } |
| | | } |
| | | |
| | |
| | | style = {...style, ...col.style} |
| | | } |
| | | |
| | | resProps.children = ( |
| | | <CardCellComponent data={record} cards={config} elements={col.elements}/> |
| | | ) |
| | | } else if (col.type === 'action') { |
| | | style.padding = '0px' |
| | | if (col.style) { |
| | | style = {...style, ...col.style} |
| | | } |
| | | resProps.children = ( |
| | | <CardCellComponent data={record} cards={config} elements={col.elements}/> |
| | | ) |
| | |
| | | onCell: record => ({ |
| | | record, |
| | | col: item, |
| | | config: item.type === 'custom' || item.type === 'action' ? {setting, columns: fields} : null, |
| | | config: item.type === 'custom' ? {setting, columns: fields} : null, |
| | | triggerLink: this.triggerLink |
| | | }) |
| | | } |