[Update] 解决Vault翻页再次选择资产时不能设置到select框的问题:select.style === single 时 (#3579)

* [Update] 解决Vault翻页再次选择资产时不能设置到select框的问题:select.style === single 时

* [Update] 优化1
pull/3581/head
BaiJiangJie 2019-12-30 16:40:38 +08:00 committed by GitHub
parent ad81d6c28e
commit c084412e53
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 2 deletions

View File

@ -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];
}
}
})
}