首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >ngx-datatable - Bootstrap主题-列标题

ngx-datatable - Bootstrap主题-列标题
EN

Stack Overflow用户
提问于 2019-01-15 06:55:46
回答 1查看 3.2K关注 0票数 3

我正在尝试用Bootstrap的主题化实现ngx-datatable。

我将Bootstrap 4和ngx-datatable中的Bootstrap CSS添加到应用程序样式中:

代码语言:javascript
复制
"styles": [
          "node_modules/bootstrap/dist/css/bootstrap.css",
          "node_modules/@swimlane/ngx-datatable/release/themes/bootstrap.css",
          "src/styles.css"
        ],

然后在我的页面组件上实现该表:

代码语言:javascript
复制
<ngx-datatable class="bootstrap"
[rows]="tablePage.results"
[columns]="columns"
[columnMode]="'force'"
[rowHeight]="'auto'"
[headerHeight]="50"
[footerHeight]="50"
[externalPaging]="true"
[loadingIndicator]="loading"
[count]="tablePage.pager.count"
[offset]="tablePage.pager.offset"
[limit]="tablePage.pager.limit"
[reorderable]="true"
(page)='setPage($event)'>

此外,所有模块都导入到应用程序模块中:

代码语言:javascript
复制
imports: [
BrowserModule,
AppRoutingModule,
HttpClientModule,
NgbModule,
FontAwesomeModule,
NgxDatatableModule
],

问题是没有显示列标题图标。没有显示任何排序方向图标,我不知道还可以添加什么,因为一切似乎都像演示站点中的设置一样。

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2019-03-14 23:00:12

别忘了包括node_modules/swimlane/ngx-datatable/release/assets/icons.css

或用于sass @import '~@swimlane/ngx-datatable/release/assets/icons.css';

票数 2
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/54190428

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档