修复rememberSelected属性设置为true时保留选中状态

dep_wangsr
RuoYi 6 years ago committed by Limy
parent 8c6fe3be7e
commit b35ba0438d

@ -98,6 +98,12 @@
if ($.common.isNotEmpty($.table._option.sidePagination) && $.table._option.sidePagination == 'client') { if ($.common.isNotEmpty($.table._option.sidePagination) && $.table._option.sidePagination == 'client') {
return res.rows; return res.rows;
} else { } else {
if ($.common.isNotEmpty($.table._option.rememberSelected) && $.table._option.rememberSelected) {
var column = $.common.isEmpty($.table._option.uniqueId) ? $.table._option.columns[1].field : $.table._option.uniqueId;
$.each(res.rows, function(i, row) {
row.state = $.inArray(row[column], selectionIds) !== -1;
})
}
return { rows: res.rows, total: res.total }; return { rows: res.rows, total: res.total };
} }
} else { } else {

@ -73,6 +73,7 @@
showPageGo: true, showPageGo: true,
rememberSelected: true, rememberSelected: true,
columns: [{ columns: [{
field: 'state',
checkbox: true checkbox: true
}, },
{ {

@ -81,6 +81,7 @@
showPageGo: true, showPageGo: true,
rememberSelected: true, rememberSelected: true,
columns: [{ columns: [{
field: 'state',
checkbox: true checkbox: true
}, },
{ {

@ -57,6 +57,7 @@
clickToSelect: true, clickToSelect: true,
rememberSelected: true, rememberSelected: true,
columns: [{ columns: [{
field: 'state',
checkbox: true checkbox: true
}, },
{ {

Loading…
Cancel
Save