固定表头方法,导入框架在table里面填入数值,然后在js里面设置一定的高度

webUi
赵桐华 5 years ago
parent 8ad9d0f27f
commit 2576ca9a5f
  1. 6
      frontend/views/menu/index.php

@ -22,7 +22,7 @@ use \common\libs\MyLib;
<div class="ibox-content">
<div class="row">
<div class="col-md-12">
<table id="listTable" class="table table-bordered" id="table" data-toggle="table" data-height="200">
<table id="listTable" class="table table-bordered" id="table" data-toggle="table" data-height="689">
<thead class="bg-warning">
<tr>
<th data-field="show_id">ID</th>
@ -120,10 +120,8 @@ use \common\libs\MyLib;
}
$(function() {
search();
var tab=$("#listTable").attr('data-height');
console.log(tab);
$('.fixed-table-body').css({'height':tab});
$('.fixed-table-body').css({'height':tab-40});
});
</script>
<?php $this->endBlock(); ?>

Loading…
Cancel
Save