修复表格冻结列错位问题

This commit is contained in:
RuoYi
2020-07-06 15:32:29 +08:00
parent 7c48bc3184
commit c52ba00f4f
2 changed files with 6 additions and 3 deletions

View File

@ -224,9 +224,12 @@
height: height,
top: top + 1
}).show();
var bsHeight = $("#" + table.options.id).find("tr").eq(1).height();
var fixedHeight = $("#" + table.options.id).parent().prev().find("tr").eq(1).height();
var resizeHeight = bsHeight > fixedHeight ? bsHeight: fixedHeight;
this.$body.find('> tr').each(function (i) {
that.$fixedBody.find('tr:eq(' + i + ')').height($(this).height() - 0.5);
that.$fixedBody.find('tr:eq(' + i + ')').height(i == 0 ? resizeHeight - 1 : resizeHeight);
var thattds = this;
that.$fixedBody.find('tr:eq(' + i + ')').find('td').each(function (j) {
$(this).width($($(thattds).find('td')[j]).width() + 1);