修复百分比排序
This commit is contained in:
@@ -109,7 +109,7 @@ function applyPercentileFilter() {
|
||||
}
|
||||
const rows = document.getElementById('rankingList').querySelectorAll('tr');
|
||||
if (rows.length === 0) return;
|
||||
const showCount = Math.ceil(totalStudents * (percentile / 100));
|
||||
const showCount = Math.max(1, Math.floor(totalStudents * (percentile / 100)));
|
||||
rows.forEach(function(row, index) {
|
||||
row.style.display = index < showCount ? '' : 'none';
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user