Browse Source

table行样式优先级逻辑调整

zhuth 7 years ago
parent
commit
cee080791a
1 changed files with 2 additions and 1 deletions
  1. 2 1
      kanban-client/app/src/Table/TableRow.jsx

+ 2 - 1
kanban-client/app/src/Table/TableRow.jsx

@@ -173,6 +173,7 @@ export default class TableRow extends React.Component {
       }
       const isColumnHaveExpandIcon = (expandIconAsCell || expandRowByClick)
         ? false : (i === expandIconColumnIndex);
+      let rowStyle = columns[i].rowStyle;
       cells.push(
         <TableCell
           prefixCls={prefixCls}
@@ -183,7 +184,7 @@ export default class TableRow extends React.Component {
           column={columns[i]}
           key={columns[i].key}
           expandIcon={isColumnHaveExpandIcon ? expandIcon : null}
-          rowStyle={columns[i].rowStyle || rowsStyle || {}}
+          rowStyle={(rowStyle && JSON.stringify(rowStyle) !== "{}") ? rowStyle : (rowsStyle || {})}
         />
       );
     }