The layui form will not refresh to the previous page when deleting the last page of data
js code
done: function (res, curr, count) {
if (curr > 1 && res.data.length === 0) {
curr = curr - 1;
table.reload('inputTable', {
page: {
curr: curr
},
where: {
},
}, 'data');
}
}