From 77bc6777167e78f2326f4e97add07f4ff1a6562c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B4=A4=E5=BF=83?= <3277200+sentsim@users.noreply.github.com> Date: Mon, 29 May 2023 11:11:40 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=20table=20=E5=BA=95=E9=83=A8?= =?UTF-8?q?=E8=BE=B9=E6=A1=86=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/css/layui.css | 2 +- src/modules/table.js | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/css/layui.css b/src/css/layui.css index cf131409..7a3fb8f9 100644 --- a/src/css/layui.css +++ b/src/css/layui.css @@ -1106,7 +1106,7 @@ input.layui-input.layui-table-edit{height: 100%;} select.layui-table-edit{padding: 0 0 0 10px; border-color: #d2d2d2;} .layui-table-view .layui-form-switch, .layui-table-view .layui-form-checkbox, -.layui-table-view .layui-form-radio{top: 0; margin: 0; box-sizing: content-box;} +.layui-table-view .layui-form-radio{top: 0; margin: 0;} .layui-table-view .layui-form-checkbox{top: -1px; height: 26px; line-height: 26px;} .layui-table-view .layui-form-checkbox i{height: 26px;} diff --git a/src/modules/table.js b/src/modules/table.js index 92d6e2bf..f073c8bd 100644 --- a/src/modules/table.js +++ b/src/modules/table.js @@ -1674,22 +1674,22 @@ layui.define(['lay', 'laytpl', 'laypage', 'form', 'util'], function(exports){ if(!height) return; - // 减去列头区域的高度 --- 此处的数字常量是为了防止容器处在隐藏区域无法获得高度的问题,暂时只对默认尺寸表格做支持 - bodyHeight = parseFloat(height) - (that.layHeader.outerHeight() || 39) - 1; + // 减去列头区域的高度 --- 此处的数字常量是为了防止容器处在隐藏区域无法获得高度的问题,只对默认尺寸表格做支持 + bodyHeight = parseFloat(height) - (that.layHeader.outerHeight() || 39) // 减去工具栏的高度 if(options.toolbar){ - bodyHeight -= (that.layTool.outerHeight() || 50); + bodyHeight -= (that.layTool.outerHeight() || 51); } // 减去统计栏的高度 if(options.totalRow){ - bodyHeight -= (that.layTotal.outerHeight() || 40) - 1; // 减掉一个共用的 border width + bodyHeight -= (that.layTotal.outerHeight() || 40); } // 减去分页栏的高度 if(options.page || options.pagebar){ - bodyHeight -= (that.layPage.outerHeight() || 43) - 1; + bodyHeight -= (that.layPage.outerHeight() || 43); } if (options.maxHeight) {