feat(Table): sticky footer on virtulization mode (#2495)

* refactor: 表头高度计算逻辑调整

* doc: 更新注释

* refactor: 更新 tfooter 样式
This commit is contained in:
Argo Zhang
2023-12-06 11:23:50 +08:00
committed by GitHub
parent 0d6111543a
commit dc2d678a75
3 changed files with 5 additions and 4 deletions

View File

@@ -84,7 +84,7 @@ public partial class Table<TItem>
public RenderFragment? GotoTemplate { get; set; }
/// <summary>
/// 获得/设置 是否显示 Goto 跳转导航
/// 获得/设置 是否显示 PageInfo 内容 默认 true 显示
/// </summary>
[Parameter]
public bool ShowPageInfo { get; set; } = true;

View File

@@ -40,7 +40,7 @@ const setBodyHeight = table => {
}
let headerHeight = 0
if (table.thead) {
headerHeight = getOuterHeight(table.thead)
headerHeight = getOuterHeight(table.thead.querySelector('thead'))
}
if (headerHeight > 0) {
body.style.height = `calc(100% - ${headerHeight}px)`

View File

@@ -9,7 +9,6 @@
--bb-table-header-icon-hover-color: #606266;
--bb-table-header-min-height: 37px;
--bb-table-footer-font-weight: blod;
--bb-table-footer-border-top: 2px solid #dee2e6;
--bb-table-card-row-padding: .75rem .5rem;
--bb-table-columnlist-max-height: var(--bb-dropdown-max-height);
--bs-table-striped-bg: rgba(0,0,0,.05);
@@ -179,7 +178,9 @@
.table tfoot {
font-weight: var(--bb-table-footer-font-weight);
border-top: var(--bb-table-footer-border-top);
position: sticky;
bottom: 0;
outline: 2px solid var(--bs-border-color);
}
.table td, .table th {