Ng2 smart table Ng2智能桌单电池样式
我希望为单元格添加自定义颜色 试用Ng2 smart table Ng2智能桌单电池样式,ng2-smart-table,Ng2 Smart Table,我希望为单元格添加自定义颜色 试用 `styles: [` :host /deep/ ng2-smart-table tbody > tr > td:first-child { color: red; } `]` 但是,如果您想给第一个单元格上色,而不仅仅是给第一列上色,那么这会改变整个第一列的颜色,您还需要将第一个子项添加到tr: :host /deep/ ng2-smart-table tbody > tr:first-child
`styles: [`
:host /deep/ ng2-smart-table tbody > tr > td:first-child {
color: red;
}
`]`
但是,如果您想给第一个单元格上色,而不仅仅是给第一列上色,那么这会改变整个第一列的颜色,您还需要将
第一个子项添加到tr
:
:host /deep/ ng2-smart-table tbody > tr:first-child > td:first-child {
color: red;
}
如果要为第一个单元格着色,而不仅仅是第一列,则还需要将第一个子项
添加到tr
:
:host /deep/ ng2-smart-table tbody > tr:first-child > td:first-child {
color: red;
}
如何将此样式绑定到ngClass?您需要将ng2智能表
更改为您的类,例如::host/deep/.testColor tbody
如何将此样式绑定到ngClass?您需要将ng2智能表
更改为您的类,例如::host/deep/.testColor tbody