From c084412e53429718b1ed14d70d7be6e20c62981d Mon Sep 17 00:00:00 2001 From: BaiJiangJie <32935519+BaiJiangJie@users.noreply.github.com> Date: Mon, 30 Dec 2019 16:40:38 +0800 Subject: [PATCH] =?UTF-8?q?[Update]=20=E8=A7=A3=E5=86=B3Vault=E7=BF=BB?= =?UTF-8?q?=E9=A1=B5=E5=86=8D=E6=AC=A1=E9=80=89=E6=8B=A9=E8=B5=84=E4=BA=A7?= =?UTF-8?q?=E6=97=B6=E4=B8=8D=E8=83=BD=E8=AE=BE=E7=BD=AE=E5=88=B0select?= =?UTF-8?q?=E6=A1=86=E7=9A=84=E9=97=AE=E9=A2=98=EF=BC=9Aselect.style=20=3D?= =?UTF-8?q?=3D=3D=20single=20=E6=97=B6=20(#3579)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * [Update] 解决Vault翻页再次选择资产时不能设置到select框的问题:select.style === single 时 * [Update] 优化1 --- apps/static/js/jumpserver.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/apps/static/js/jumpserver.js b/apps/static/js/jumpserver.js index af9a032a0..d334d6c64 100644 --- a/apps/static/js/jumpserver.js +++ b/apps/static/js/jumpserver.js @@ -713,8 +713,14 @@ jumpserver.initServerSideDataTable = function (options) { var rows = table.rows(indexes).data(); $.each(rows, function (id, row) { if (row.id && $.inArray(row.id, table.selected) === -1) { - table.selected.push(row.id); - table.selected_rows.push(row); + if (select.style === 'multi'){ + table.selected.push(row.id); + table.selected_rows.push(row); + } + else{ + table.selected = [row.id]; + table.selected_rows = [row]; + } } }) }