From 4e120efe29f78aefccde64b12ef249a9d8a6b29f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B4=A4=E5=BF=83?= <3277200+sentsim@users.noreply.github.com> Date: Sun, 14 May 2023 11:42:19 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=20table=20=E5=BD=93=20`page`?= =?UTF-8?q?=20=E6=9C=AA=E5=BC=80=E5=90=AF=E4=B8=94=20`totalRow`=20?= =?UTF-8?q?=E5=BC=80=E5=90=AF=E6=97=B6=EF=BC=8C=E9=A1=B5=E8=84=9A=E5=87=BA?= =?UTF-8?q?=E7=8E=B0=E5=8F=8C=E5=BA=95=E7=BA=BF=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/modules/table.js | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/modules/table.js b/src/modules/table.js index 1c8e42f1..9c8a70b8 100644 --- a/src/modules/table.js +++ b/src/modules/table.js @@ -1674,20 +1674,22 @@ layui.define(['lay', 'laytpl', 'laypage', 'form', 'util'], function(exports){ if(!height) return; - //减去列头区域的高度 - bodyHeight = parseFloat(height) - (that.layHeader.outerHeight() || 38) - 1; //此处的数字常量是为了防止容器处在隐藏区域无法获得高度的问题,暂时只对默认尺寸的表格做支持。 + // 减去列头区域的高度 --- 此处的数字常量是为了防止容器处在隐藏区域无法获得高度的问题,暂时只对默认尺寸的表格做支持。 + bodyHeight = parseFloat(height) - (that.layHeader.outerHeight() || 38) - ( + options.page ? 1 : 0 + ); - //减去工具栏的高度 + // 减去工具栏的高度 if(options.toolbar){ bodyHeight -= (that.layTool.outerHeight() || 50); } - //减去统计栏的高度 + // 减去统计栏的高度 if(options.totalRow){ bodyHeight -= (that.layTotal.outerHeight() || 40); } - //减去分页栏的高度 + // 减去分页栏的高度 if(options.page || options.pagebar){ bodyHeight -= (that.layPage.outerHeight() || 43); }