将类添加到动态 Bootstrap 表行

Kod*_*der 2 html javascript jquery twitter-bootstrap bootstrap-4

所以我想在表行中添加一个类(标题除外),但我不知道该怎么做。有人知道我该怎么做吗?

这是我的桌子:

<table id="table" class="hidden table table-bordered table-striped table-hover">
    <thead>
        <tr>
            <th data-field="variant">Variant</th>
            <th data-field="description">Description</th>
        </tr>
    </thead>
</table>
Run Code Online (Sandbox Code Playgroud)

目前这是我添加数据并想要将类添加到行中的位置

$('#table').bootstrapTable({
    data: returnValue
});
Run Code Online (Sandbox Code Playgroud)

jid*_*l21 5

查看引导表文档并使用行样式属性,我不熟悉该插件,但我想它应该是这样的

$('#table').bootstrapTable({
    data: returnValue, 
    rowStyle :  function(row, index) {
     return {
     classes: 'text-nowrap another-class',
     css: {"color": "blue", "font-size": "50px"}
     };
 }
});
Run Code Online (Sandbox Code Playgroud)

阅读这里的文档http://bootstrap-table.wenzhixin.net.cn/documentation/