refactor: 微调脚本与样式适配固定表头是表格高度
This commit is contained in:
parent
41d967c910
commit
625267d354
|
@ -6,6 +6,7 @@
|
|||
查询结果
|
||||
</div>
|
||||
<div class="card-body">
|
||||
@TableInfoTemplate
|
||||
<Table @ref="Table" Id="@Id" FixedHeader="@FixedHeader" ShowToolBar="true" ShowExtendButtons="true" ShowRefresh="true" ShowSearch="true" ShowCheckbox="true" ShowDefaultButtons="true" QueryModel="QueryModel" TItem="TItem" SubmitModalTitle="@SubmitModalTitle" OnQuery="QueryData" OnAdd="OnAdd" OnDelete="OnDelete" OnSave="OnSave" OnResetSearch="OnResetSearch">
|
||||
<TableToolbarTemplate>
|
||||
@TableToolbarTemplate
|
||||
|
|
|
@ -136,7 +136,7 @@ nav .dropdown .nav-link-close.dropdown-toggle:after {
|
|||
}
|
||||
|
||||
.bootstrap-table .table-fixed {
|
||||
height: 388px;
|
||||
height: 324px;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
|
@ -149,7 +149,7 @@ nav .dropdown .nav-link-close.dropdown-toggle:after {
|
|||
}
|
||||
|
||||
.bootstrap-table .fixed-table-body {
|
||||
min-height: 348px;
|
||||
min-height: 284px;
|
||||
}
|
||||
|
||||
.bootstrap-table .fixed-table-body table {
|
||||
|
|
|
@ -187,16 +187,10 @@
|
|||
$(header).width($(element).width());
|
||||
});
|
||||
},
|
||||
resetTableHeight(source) {
|
||||
resetTableHeight: function (source) {
|
||||
var table = source;
|
||||
var height = 0;
|
||||
do {
|
||||
height += source.position().top;
|
||||
source = source.parent();
|
||||
if (source.hasClass('tab-content')) break;
|
||||
}
|
||||
while (source.length === 1);
|
||||
height = $(window).height() - height - 15 - 38;
|
||||
var height = source.parents('.bootstrap-table').position().top;
|
||||
height = $(window).height() - height - 184 - 51 - 45 - 37;
|
||||
table.height(height);
|
||||
},
|
||||
initTable: function (id, firstRender) {
|
||||
|
|
|
@ -474,7 +474,7 @@
|
|||
marginHeight += calcPrevHeight($prev);
|
||||
marginHeight += calcParentHeight(element.parent());
|
||||
}
|
||||
return Math.max(settings.minHeight, $(window).height() - $('header').outerHeight(true) - $('footer').outerHeight(true) - marginHeight - 15 - 10);
|
||||
return Math.max(settings.minHeight, $(window).height() - $('header').outerHeight(true) - $('footer').outerHeight(true) - marginHeight - 20 - 10);
|
||||
};
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue