From 82fd3686a0418a88e521dfea98528c89c223c8ff Mon Sep 17 00:00:00 2001 From: Code_of_Walker Date: Thu, 15 Apr 2021 11:34:22 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=8E=92=E5=BA=8F=E7=AE=AD?= =?UTF-8?q?=E5=A4=B4=E9=81=AE=E6=8C=A1=E8=A1=A8=E5=A4=B4=E6=96=87=E5=AD=97?= =?UTF-8?q?=EF=BC=9B=E4=BF=AE=E5=A4=8D=E5=9B=BA=E5=AE=9A=E5=88=97=E6=97=A0?= =?UTF-8?q?=E6=B3=95=E9=80=89=E4=B8=AD=E9=97=AE=E9=A2=98=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/assets/css/backend.css | 2 +- public/assets/js/require-table.js | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/public/assets/css/backend.css b/public/assets/css/backend.css index 42148fa6e..8addea19b 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 98244086f..e1ea32c0f 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) { -- Gitee