修复ts警告

This commit is contained in:
YHH
2025-10-16 18:20:31 +08:00
parent 8d741bf1b9
commit 2a17c47c25
9 changed files with 36 additions and 28 deletions

View File

@@ -106,13 +106,11 @@ export function ConsolePanel({ logService }: ConsolePanelProps) {
};
const formatTime = (date: Date): string => {
return date.toLocaleTimeString('en-US', {
hour12: false,
hour: '2-digit',
minute: '2-digit',
second: '2-digit',
fractionalSecondDigits: 3
});
const hours = date.getHours().toString().padStart(2, '0');
const minutes = date.getMinutes().toString().padStart(2, '0');
const seconds = date.getSeconds().toString().padStart(2, '0');
const ms = date.getMilliseconds().toString().padStart(3, '0');
return `${hours}:${minutes}:${seconds}.${ms}`;
};
const toggleLogExpand = (logId: number) => {