Ng2-smart-table 单细胞样式

Ng2-smart-table Single Cell styling

我想为单元格添加自定义颜色。

尝试使用

`styles: [`    
    :host /deep/ ng2-smart-table tbody > tr > td:first-child {
    color: red;
    }
    `]`

但这会改变整个第一列的颜色

如果您不仅要为第一列着色第一个单元格,还需要将 first-child 添加到 tr

:host /deep/ ng2-smart-table tbody > tr:first-child > td:first-child {
  color: red;
  }