From 02e61f2dbf1dac9f7ffe1c9bd9ea13b1362ed0ee Mon Sep 17 00:00:00 2001 From: ZHAOTONGHUA <2066753415@qq.com> Date: Tue, 26 Nov 2019 14:14:11 +0800 Subject: [PATCH] =?UTF-8?q?=E8=8E=B7=E5=8F=96table=E9=AB=98=E5=BA=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/views/database/b-index.php | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/frontend/views/database/b-index.php b/frontend/views/database/b-index.php index cdca44a..b866661 100644 --- a/frontend/views/database/b-index.php +++ b/frontend/views/database/b-index.php @@ -97,7 +97,7 @@ use \common\libs\MyLib;
- +
@@ -123,6 +123,7 @@ use \common\libs\MyLib; beginBlock('footer_js'); ?> + @@ -153,8 +154,22 @@ use \common\libs\MyLib; return false; } + //固定表头 + function fix(){ + //table设置一定的高度 + var tab=$("#listTable").attr('data-height'); + console.log($('.fixed-table-body').height()); + console.log($('.fixed-table-body').offsetHeight()); + //$('.fixed-table-body').css({'height':tab-40}); + //当浏览器窗口变化时,表头与表格不对齐解决 + $('.table').bootstrapTable(); + $(window).resize(function () { + $('.table').bootstrapTable('resetView'); + }); + } $(function() { search(); + fix(); $('.input-daterange').datepicker({ keyboardNavigation: false, forceParse: false,