From fd8cc60e4e71cdf1a8d9674e0a23d7c133e6822f Mon Sep 17 00:00:00 2001 From: RuoYi Date: Wed, 24 Jul 2019 19:21:59 +0800 Subject: [PATCH] =?UTF-8?q?=E5=86=BB=E7=BB=93=E5=88=97=E5=8E=BB=E9=99=A4?= =?UTF-8?q?=E9=80=89=E4=B8=AD=E8=83=8C=E6=99=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../extensions/columns/bootstrap-table-fixed-columns.js | 6 ++++-- ruoyi-admin/src/main/resources/static/css/style.css | 5 ----- ruoyi-admin/src/main/resources/static/ruoyi/css/ry-ui.css | 6 ++++++ 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/ruoyi-admin/src/main/resources/static/ajax/libs/bootstrap-table/extensions/columns/bootstrap-table-fixed-columns.js b/ruoyi-admin/src/main/resources/static/ajax/libs/bootstrap-table/extensions/columns/bootstrap-table-fixed-columns.js index 017566ff..ca51f076 100644 --- a/ruoyi-admin/src/main/resources/static/ajax/libs/bootstrap-table/extensions/columns/bootstrap-table-fixed-columns.js +++ b/ruoyi-admin/src/main/resources/static/ajax/libs/bootstrap-table/extensions/columns/bootstrap-table-fixed-columns.js @@ -94,7 +94,8 @@ this.$selectAll = $ltr.find('[name="btSelectAll"]'); this.$selectAll.on('click', function () { var checked = $(this).prop('checked'); - $(".left-fixed-table-columns input[name=btSelectItem]").filter(':enabled').prop('checked', checked); + $(".left-fixed-body-columns input[name=btSelectItem]").filter(':enabled').prop('checked', checked); + $('.fixed-table-body input[name=btSelectItem]').closest('tr').removeClass('selected'); }); } }; @@ -235,11 +236,12 @@ $.btTable.on("check.bs.table uncheck.bs.table", function (e, rows, $element) { var index= $element.data('index'); $(this).find('.bs-checkbox').find('input[data-index="' + index + '"]').prop("checked", true); - var selectFixedItem = $('.left-fixed-table-columns input[name=btSelectItem]'); + var selectFixedItem = $('.left-fixed-body-columns input[name=btSelectItem]'); var checkAll = selectFixedItem.filter(':enabled').length && selectFixedItem.filter(':enabled').length === selectFixedItem.filter(':enabled').filter(':checked').length; $(".left-fixed-table-columns input[name=btSelectAll]").prop('checked', checkAll); + $('.fixed-table-body input[name=btSelectItem]').closest('tr').removeClass('selected'); }); //// events diff --git a/ruoyi-admin/src/main/resources/static/css/style.css b/ruoyi-admin/src/main/resources/static/css/style.css index e731a84d..ec08c0a1 100644 --- a/ruoyi-admin/src/main/resources/static/css/style.css +++ b/ruoyi-admin/src/main/resources/static/css/style.css @@ -7065,9 +7065,4 @@ body.rtls .top-navigation .footer.fixed, body.rtls.top-navigation .footer.fixed top: 0px; z-index: 9998; margin: 0; -} - -.selected{ - background-color: #E8F7FD; - color: #1890ff; } \ No newline at end of file diff --git a/ruoyi-admin/src/main/resources/static/ruoyi/css/ry-ui.css b/ruoyi-admin/src/main/resources/static/ruoyi/css/ry-ui.css index f37905e9..c87a98d9 100644 --- a/ruoyi-admin/src/main/resources/static/ruoyi/css/ry-ui.css +++ b/ruoyi-admin/src/main/resources/static/ruoyi/css/ry-ui.css @@ -956,4 +956,10 @@ label { background-color:#999!important; text-shadow:0 0 10px black,0 0 10px black,0 0 8px black,0 0 6px black,0 0 6px black; box-shadow:0 12px 14px -12px #111 inset,0 -2px 2px -1px #333 inset +} + +/** 表格选中样式 **/ +.fixed-table-container .selected { + background-color: #E8F7FD; + color: #1890ff; } \ No newline at end of file