-2

我正在尝试向我的 ngx-datatable 中的单元格添加一个类。

columns.push({ 
    cellTemplate: this.bodyPositionsTmpl, 
    cellClass: 'test', 
    headerTemplate: this.headerPositionsTpl, 
    name: 'Employments', 
    width: this.planningGridColumnWidths.position, 
    frozenLeft: true, 
    frozenRight: false 

});

但是,当我检查我的元素时,我没有看到添加的类:

<datatable-body-cell ....... class="datatable-body-cell sort-active">

它不应该出现在这里吗?

4

1 回答 1

0

它确实可以正常工作。我只是在错误的地方添加了课程。对不起!

于 2017-10-06T09:02:54.883 回答