c库,无效库固定表头

webUi
赵桐华 5 years ago
parent 73fe93f94e
commit 51c12ec87c
  1. 14
      frontend/views/database/d-index.php
  2. 14
      frontend/views/database/invalid-index.php

@ -87,7 +87,7 @@ use \common\libs\MyLib;
</form> </form>
<div class="row" style="margin-top:20px;"> <div class="row" style="margin-top:20px;">
<div class="col-md-12"> <div class="col-md-12">
<table id="listTable"> <table id="listTable" class="table" data-toggle="table" data-height="550">
<thead class="bg-warning"> <thead class="bg-warning">
<tr > <tr >
<th data-field="state" data-checkbox="true"></th> <th data-field="state" data-checkbox="true"></th>
@ -146,9 +146,21 @@ use \common\libs\MyLib;
}); });
return false; return false;
} }
//固定表头
function fix(){
//table设置一定的高度
var tab=$("#listTable").attr('data-height');
$('.fixed-table-body').css({'height':tab-100});
//当浏览器窗口变化时,表头与表格不对齐解决
$('.table').bootstrapTable();
$(window).resize(function () {
$('.table').bootstrapTable('resetView');
});
}
$(function() { $(function() {
search(); search();
fix();
$('.input-daterange').datepicker({ $('.input-daterange').datepicker({
keyboardNavigation: false, keyboardNavigation: false,
forceParse: false, forceParse: false,

@ -61,7 +61,7 @@ use \common\libs\MyLib;
</form> </form>
<div class="row" style="margin-top:20px;"> <div class="row" style="margin-top:20px;">
<div class="col-md-12"> <div class="col-md-12">
<table id="listTable"> <table id="listTable" class="table" data-toggle="table" data-height="550">
<thead class="bg-warning"> <thead class="bg-warning">
<tr> <tr>
<th data-field="state" data-checkbox="true"></th> <th data-field="state" data-checkbox="true"></th>
@ -120,9 +120,21 @@ use \common\libs\MyLib;
}); });
return false; return false;
} }
//固定表头
function fix(){
//table设置一定的高度
var tab=$("#listTable").attr('data-height');
$('.fixed-table-body').css({'height':tab-100});
//当浏览器窗口变化时,表头与表格不对齐解决
$('.table').bootstrapTable();
$(window).resize(function () {
$('.table').bootstrapTable('resetView');
});
}
$(function() { $(function() {
search(); search();
fix();
$('.input-daterange').datepicker({ $('.input-daterange').datepicker({
keyboardNavigation: false, keyboardNavigation: false,
forceParse: false, forceParse: false,

Loading…
Cancel
Save