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(); ?>