当浏览器窗口变化时,表头与表格不对齐解决

webUi
赵桐华 5 years ago
parent 48734892e5
commit e6034097be
  1. 6
      frontend/views/menu/index.php
  2. 6
      frontend/views/permissions/index.php

@ -21,7 +21,7 @@ use \common\libs\MyLib;
<div class="ibox-content">
<div class="row">
<div class="col-md-12">
<table id="listTable table" class="table" id="table" data-toggle="table" data-height="708">
<table id="listTable align" class="table" id="table" data-toggle="table" data-height="708">
<thead class="bg-warning">
<tr>
<th data-field="show_id">ID</th>
@ -108,9 +108,9 @@ use \common\libs\MyLib;
var tab=$("#listTable").attr('data-height');
$('.fixed-table-body').css({'height':tab-40});
//当浏览器窗口变化时,表头与表格不对齐解决
$('#table').bootstrapTable();
$('#align').bootstrapTable();
$(window).resize(function () {
$('#table').bootstrapTable('resetView');
$('#align').bootstrapTable('resetView');
});
});
</script>

@ -21,7 +21,7 @@ use \common\libs\MyLib;
<div class="ibox-content">
<div class="row">
<div class="col-md-12">
<table id="listTable table" class="table" id="table" data-toggle="table" data-height="708">
<table id="listTable align" class="table" id="table" data-toggle="table" data-height="708">
<thead class="bg-warning">
<tr>
<th data-field="id">ID</th>
@ -104,9 +104,9 @@ use \common\libs\MyLib;
var tab=$("#listTable").attr('data-height');
$('.fixed-table-body').css({'height':tab-40});
//当浏览器窗口变化时,表头与表格不对齐解决
$('#table').bootstrapTable();
$('#align').bootstrapTable();
$(window).resize(function () {
$('#table').bootstrapTable('resetView');
$('#align').bootstrapTable('resetView');
});
});
</script>

Loading…
Cancel
Save