已解决 是自己代码 样式设置为题。因为是tab切换 添加了 .dataTables_wrapper .dataTables_scroll .dataTables_scrollHead .dataTables_scrollHeadInner,.dataTables_wrapper .dataTables_scroll .dataTables_scrollHead .dataTables_scrollHeadInner >table.dataTable,.dataTables_wrapper .dataTables_scroll .dataTables_scrollBody > table.dataTable { width: 100% !important; } 正确做法是:$('a[data-toggle="tab"]').on('shown.bs.tab', function (e) {//渲染表格事件 e.target // newly activated tab e.relatedTarget // previous active tab})
已解决 是自己代码 样式设置为题。因为是tab切换
添加了
.dataTables_wrapper .dataTables_scroll .dataTables_scrollHead .dataTables_scrollHeadInner,
.dataTables_wrapper .dataTables_scroll .dataTables_scrollHead .dataTables_scrollHeadInner >table.dataTable,
.dataTables_wrapper .dataTables_scroll .dataTables_scrollBody > table.dataTable {
width: 100% !important;
}
正确做法是:
$('a[data-toggle="tab"]').on('shown.bs.tab', function (e) {
//渲染表格事件
e.target // newly activated tab
e.relatedTarget // previous active tab
})