column加入属性fontColor和bgColor

This commit is contained in:
huayj 2019-08-24 14:15:12 +08:00
parent b6f5cc0abc
commit ccdc64a61b
1 changed files with 2 additions and 2 deletions

View File

@ -72,7 +72,7 @@ class TableCell extends Component{
render() { render() {
const { record, indentSize, clsPrefix, indent, const { record, indentSize, clsPrefix, indent,
index, expandIcon, column ,fixed,showSum, bodyDisplayInRow,lazyStartIndex,lazyEndIndex} = this.props; index, expandIcon, column ,fixed,showSum, bodyDisplayInRow,lazyStartIndex,lazyEndIndex} = this.props;
const { dataIndex, render, fieldType, linkConfig } = column; const { dataIndex, render, fieldType, linkConfig, fontColor, bgColor } = column;
let {className = ''} = column; let {className = ''} = column;
let text = objectPath.get(record, dataIndex); let text = objectPath.get(record, dataIndex);
@ -141,7 +141,7 @@ class TableCell extends Component{
className={className} className={className}
onClick={this.handleClick} onClick={this.handleClick}
title={title} title={title}
style={{color:fontColor,backgroundColor:bgColor}}
> >
{indentText} {indentText}
{expandIcon} {expandIcon}