我已经在我的 Web 应用程序中实现了 Angular-Datatables(使用 Bootstrap 样式),但我似乎无法弄清楚如何让我的数据表看起来像他们网站上的示例。
例如,他们的数据表具有以下特征:
- 每个列标题的图标(如下所示)
- 列标题的白色背景色
- 条纹行从灰色开始,然后是白色等。
而我的默认表具有以下内容:
- 表示当前有序列的箭头(如下所示)
- 列标题的灰色背景色
- 条纹行以白色开始,然后是灰色等。
我添加了标准引导主题文件:
<link rel="stylesheet" type="text/css" href="../vendor/bootstrap/css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="../vendor/angular-datatables/dist/plugins/bootstrap/datatables.bootstrap.min.css">
设置我的默认数据表:
<div>
<table datatable="" dt-options="dtOptions" dt-columns="dtColumns" class="table table-striped table-hover table-bordered" width="100%"></table>
</div>
并使用引导程序选择了我的数据表:
$scope.dtOptions = DTOptionsBuilder
.fromFnPromise(function() {
var deferred = $q.defer();
deferred.resolve(users);
return deferred.promise;
})
.withBootstrap() // Style with Bootstrap
...
};
甚至引导网站上的示例都模仿了数据表格式。我可能忽略了什么吗?