feat: 更新时间格式显示,增加小时和秒的支持;优化表格样式,统一单元格内边距

This commit is contained in:
MKStoler1024 2025-04-12 15:02:33 +00:00
parent 7e3927dc96
commit 8aabdb8e00
3 changed files with 14 additions and 6 deletions

View File

@ -31,13 +31,16 @@ function updateDisplay() {
function formatTime(ms) {
try {
if (ms < 0) return '00:00';
if (ms < 0) return '00:00:00';
var totalSeconds = Math.floor(ms / 1000),
minutes = Math.floor(totalSeconds / 60),
hours = Math.floor(totalSeconds / 3600),
minutes = Math.floor((totalSeconds % 3600) / 60),
seconds = totalSeconds % 60;
return (minutes < 10 ? '0' : '') + minutes + ':' + (seconds < 10 ? '0' : '') + seconds;
return (hours < 10 ? '0' : '') + hours + ':' +
(minutes < 10 ? '0' : '') + minutes + ':' +
(seconds < 10 ? '0' : '') + seconds;
} catch (e) {
return '--:--';
return '--:--:--';
}
}

View File

@ -10,6 +10,9 @@
transition: all 0.2s ease;
box-shadow: 0 4px 12px rgba(39, 174, 96, 0.25);
margin-top: 10px;
margin: 0;
height: 38px;
line-height: 18px;
}
.action-btn:hover {
transform: translateY(-1px);

View File

@ -7,15 +7,17 @@
overflow: hidden;
box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}
.schedule-table th, .schedule-table td {
padding: 14px 16px;
text-align: left;
}
.schedule-table th {
background: #f8f9fa;
padding: 16px;
color: #57606f;
font-weight: 600;
border-bottom: 2px solid #e0e6ed;
}
.schedule-table td {
padding: 14px;
border-bottom: 1px solid #f1f3f6;
}
.current-class {