diff --git a/public/assets/css/backend.css b/public/assets/css/backend.css index 42148fa6efc82c07be015b543e6992ef2cdfb45b..8addea19b81b5327e5f15de5b3b1fb33e76b7770 100644 --- a/public/assets/css/backend.css +++ b/public/assets/css/backend.css @@ -788,7 +788,7 @@ table.table-nowrap thead > tr > th { white-space: nowrap; } .fixed-table-container thead th .sortable { - padding-right: 0; + padding-right: 16px; } .dropdown-submenu { position: relative; diff --git a/public/assets/js/require-table.js b/public/assets/js/require-table.js index 98244086fe33b35f9e89e653c65fabdffc3a329f..e1ea32c0fbee58b8589d7dd986730ce221e8f198 100644 --- a/public/assets/js/require-table.js +++ b/public/assets/js/require-table.js @@ -185,6 +185,17 @@ define(['jquery', 'bootstrap', 'moment', 'moment/locale/zh-cn', 'bootstrap-table if (typeof data.rows === 'undefined' && typeof data.code != 'undefined') { Toastr.error(data.msg); } + + if (table.bootstrapTable('getOptions').fixedColumns){ + $('.fixed-table-container>.fixed-columns tbody tr ' + 'input[name="' + table.bootstrapTable('getOptions').selectItemName + '"]').off("click").click(function (eve) { + if ($(this).parents("tr").hasClass('selected')) { + table.bootstrapTable('uncheck', $(this).data("index")); + } else { + table.bootstrapTable('check', $(this).data("index")); + } + eve.stopPropagation(); + }); + } }); //当刷新表格时 table.on('refresh.bs.table', function (e, settings, data) {