angular - 在标题行之后的角度材料表中将页脚放在顶部而不是底部
问题描述
我想将页脚放在标题行之后的材料表中。我尝试了使用 CSS 的不同方法,但没有成功。下面是我的HTML:
<div class="table-wrapper">
<div class="table-container">
<table mat-table #table [dataSource]="dataSource" matSort>
<ng-container *ngFor="let col of displayedColumns" [matColumnDef]="col">
<th mat-header-cell *matHeaderCellDef mat-sort-header>{{ columnHeading[col] }}</th>
<td mat-footer-cell *matFooterCellDef>
<ng-container *ngIf="col == 'totalQty'">{{ totalQty }}</ng-container>
<ng-container *ngIf="col == 'totalPrice'">
<div class="grid grid-rows-3 grid-flow-col">
<div>Bill Total =</div>
<div>Discount =</div>
<div>Total Amount =</div>
<div class="inline-flex float-right">{{ totalPrice }}</div>
<div class="inline-flex float-right">- {{ totalDiscount }}</div>
<div class="inline-flex float-right">{{ receivableAmount }}</div>
</div>
</ng-container>
</td>
<td mat-cell *matCellDef="let element; let i = index">
{{ element[col] }}
</td>
</ng-container>
<tr mat-header-row *matHeaderRowDef="displayedColumns; sticky: true"></tr>
<tr mat-footer-row *matFooterRowDef="displayedColumns"></tr>
<tr mat-row *matRowDef="let row; columns: displayedColumns"></tr>
</table>
</div>
解决方案
推荐阅读
- jquery - 如何使用 jQuery 触发选择列表中的链接?
- r - 如何根据另一个数据框的行组织数据框的列?
- reactjs - 关于在索引页面中检索页面名称
- ios - 用于启用/禁用焦点模式的 iOS API
- python - 将 Python 函数传递给 Python 函数,但它是 C/C++ 扩展
- kotlin-coroutines - 在未指定调度程序的情况下启动的协程不会被取消
- node.js - 如何修复这个 MongoClient 连接?
- javascript - 为什么它显示空对象但仍然能够迭代?
- python - conda更新后,使用matplotlib时python内核崩溃
- node.js - 在 botsolutions 服务器上部署节点 Js 应用程序