From 234595a9baa73eb7800cadf933e5936fb51136d4 Mon Sep 17 00:00:00 2001 From: ZHAOTONGHUA <2066753415@qq.com> Date: Tue, 26 Nov 2019 11:59:48 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9B=BA=E5=AE=9A=E8=A1=A8=E5=A4=B4=E4=B9=8B?= =?UTF-8?q?=E5=90=8E=E5=BD=93=E6=B5=8F=E8=A7=88=E5=99=A8=E7=AA=97=E5=8F=A3?= =?UTF-8?q?=E5=8F=98=E5=8C=96=E6=97=B6=EF=BC=8C=E8=A1=A8=E5=A4=B4=E4=B8=8E?= =?UTF-8?q?=E8=A1=A8=E6=A0=BC=E4=B8=8D=E5=AF=B9=E9=BD=90=E8=A7=A3=E5=86=B3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/views/menu/index.php | 14 +++++++++----- frontend/views/permissions/index.php | 22 +++++++++++++--------- 2 files changed, 22 insertions(+), 14 deletions(-) diff --git a/frontend/views/menu/index.php b/frontend/views/menu/index.php index ccc0d92..3f1ee45 100644 --- a/frontend/views/menu/index.php +++ b/frontend/views/menu/index.php @@ -101,17 +101,21 @@ use \common\libs\MyLib; }); } - $(function() { - search(); - + //固定表头 + function fix(){ //table设置一定的高度 var tab=$("#listTable").attr('data-height'); $('.fixed-table-body').css({'height':tab-40}); //当浏览器窗口变化时,表头与表格不对齐解决 - $('#align').bootstrapTable(); + $('.table').bootstrapTable(); $(window).resize(function () { - $('#align').bootstrapTable('resetView'); + $('.table').bootstrapTable('resetView'); }); + } + + $(function() { + search(); + fix(); }); endBlock(); ?> diff --git a/frontend/views/permissions/index.php b/frontend/views/permissions/index.php index e315f74..40253b3 100644 --- a/frontend/views/permissions/index.php +++ b/frontend/views/permissions/index.php @@ -97,17 +97,21 @@ use \common\libs\MyLib; } }); } + //固定表头 + function fix(){ + //table设置一定的高度 + var tab=$("#listTable").attr('data-height'); + $('.fixed-table-body').css({'height':tab-40}); + //当浏览器窗口变化时,表头与表格不对齐解决 + $('.table').bootstrapTable(); + $(window).resize(function () { + $('.table').bootstrapTable('resetView'); + }); + } + $(function() { search(); - - //table设置一定的高度 - var tab=$("#listTable").attr('data-height'); - $('.fixed-table-body').css({'height':tab-40}); - //当浏览器窗口变化时,表头与表格不对齐解决 - $('.table').bootstrapTable(); - $(window).resize(function () { - $('.table').bootstrapTable('resetView'); - }); + fix(); }); endBlock(); ?>