瀏覽代碼

table行样式优先级逻辑调整

zhuth 8 年之前
父節點
當前提交
cee080791a
共有 1 個文件被更改,包括 2 次插入 和 1 次删除
  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 || {})}
         />
       );
     }