ngx datatable页脚图标未显示

时间:2018-10-16 06:43:38

标签: angular6 ngx-datatable

无法正确显示ngx数据表默认页脚。 它显示了这样的页脚 ngxdatatable footer

我的代码

    <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>

2 个答案:

答案 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"
],