固定表头方法,直接在js里面设置一定的高度

webUi
赵桐华 5 years ago
parent 1511de86f9
commit 6b950e5f6b
  1. 19
      frontend/views/menu/index.php
  2. 16
      frontend/views/permissions/index.php

@ -99,27 +99,8 @@ use \common\libs\MyLib;
}
});
}
//使得table有一定的高度,出现滚动条
function table(){
//获取body高度
var a=$(".gray-bg").height();
//获取条件选择高度
var b=$('#searchFrm').height();
//获取标题高度
var c=$('.ibox-title').height();
//获取table高度
var e=$(".fixed-table-body").height();
var d=a-c-100;
$('.fixed-table-body').css({'height':d});
}
$(function() {
search();
table();
});
</script>
<?php $this->endBlock(); ?>

@ -96,24 +96,8 @@ use \common\libs\MyLib;
}
});
}
//使得table有一定的高度,出现滚动条
function table(){
//获取body高度
var a=$(".gray-bg").height();
//获取标题高度
var c=$('.ibox-title').height();
//获取table高度
var e=$(".fixed-table-body").height();
console.log(e);
var d=a-c-100;
$('.fixed-table-body').css({'height':d});
}
$(function() {
search();
table();
});
</script>
<?php $this->endBlock(); ?>

Loading…
Cancel
Save