Commit 4ea924b5 by guanzhenshan

增加动态适应屏幕,可适配不同尺寸屏幕

parent 59760a90
......@@ -45,7 +45,7 @@
<div class="bootstrap-table">
<div class="fixed-table-container">
<div class="fixed-table-body">
<table id="roletable" style="table table-bordered" class="table table-border table-bordered table-hover table-bg table-sort" data-toggle="table" data-height="350">
<table id="roletable" style="table table-bordered" class="table table-border table-bordered table-hover table-bg table-sort" data-toggle="table">
<thead>
<tr id="tb_head" class="text-c"></tr>
</thead>
......@@ -82,7 +82,7 @@
laydate.render({ elem: '#start' });
laydate.render({ elem: '#end' });
$('#roletable').attr('data-height', document.body.clientHeight - 170);
//$('#roletable').attr('data-height', document.body.clientHeight - 170);
list();
......@@ -182,14 +182,11 @@
//初始化固定头和固定列
$("#roletable").bootstrapTable({
height: (document.body.clientHeight-170),
fixedColumns: true,
fixedNumber: 1 //固定列数
});
$(window).resize(function () {
$('#roletable').attr('data-height', document.body.clientHeight - 170);
$('#roletable').bootstrapTable('resetView');
});
}
else {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment