我的代码
<ngx-datatable
#table
[columnMode]="'force'"
[headerHeight]="50"
[rowHeight]="'auto'"
[footerHeight]="50"
[count]="true"
[limit]="4"
[rows]="data"
>
<ngx-datatable-column [width]=10>
<ng-template let-row="row" ngx-datatable-cell-template>
<span class="circle" [ngClass]="{'red': row.alertCat == 'HIGH','yellow': row.alertCat == 'MEDIUM', 'green': row.alertCat == 'LOW'}"></span>
</ng-template>
</ngx-datatable-column>
<ngx-datatable-column name="ID" [width]=10>
<ng-template let-column="column" ngx-datatable-header-template>
<strong class="text-uppercase alertHeading">ID</strong>
</ng-template>
<ng-template let-row="row">
{{row.id}}
</ng-template>
</ngx-datatable-column>
</ngx-datatable>
答案 0 :(得分:0)
如果我没记错的话,您的页脚类将被其他类覆盖。检查它们,您将知道或提供您的图标,例如font-awesome。 对于
.datatable-icon-left {
content: @fa-var-chevron-left;
}
答案 1 :(得分:0)
在主node_modules/@swimlane/ngx-datatable/release/assets/icons.css
中使用.scss file
:
"styles": [
// ...
"node_modules/@swimlane/ngx-datatable/release/assets/icons.css"
],