如何自定义 ngx 数据表。我无法找到必须更改代码以删除记录总数并将其替换为下拉列表以显示每页项目的位置。我的分页也缺少一些图标。
使用自定义页脚模板(请参阅下面的链接)。所以它会覆盖默认的页脚。
https://github.com/swimlane/ngx-datatable/blob/master/demo/basic/footer.component.ts https://github.com/swimlane/ngx-datatable/blob/master/demo/basic/footer.component.ts
Examples
如果您只想删除页脚,只需使用:
<ngx-datatable-footer></ngx-datatable-footer>
如果你想定制它:
<ngx-datatable-footer>
<ng-template
ngx-datatable-footer-template
let-rowCount="rowCount"
let-pageSize="pageSize"
let-selectedCount="selectedCount"
let-curPage="curPage"
let-offset="offset"
>
<div style="padding: 5px 10px">
<div><strong>Summary</strong>: Gender: Female</div>
<hr style="width:100%" />
<div>
Rows: {{ rowCount }} | Size: {{ pageSize }} | Current:
{{ curPage }} | Offset: {{ offset }}
</div>
</div>
</ng-template>
</ngx-datatable-footer>
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)