diff --git a/src/main_modules/logs.js b/src/main_modules/logs.js index ebcd5874..14ab0942 100644 --- a/src/main_modules/logs.js +++ b/src/main_modules/logs.js @@ -140,16 +140,12 @@ function formatDate(date) { if (!date) { date = new Date(); } - // 补零函数 function pad(number) { return number < 10 ? "0" + number : number; } - const year = date.getFullYear(); - const month = pad(date.getMonth() + 1); // getMonth() 返回 0-11,需加1 + const month = pad(date.getMonth() + 1); const day = pad(date.getDate()); - - // 你可以自定义格式 return `${year}-${month}-${day}`; } diff --git a/src/render_modules/logs.js b/src/render_modules/logs.js index 4e1919fc..22b06312 100644 --- a/src/render_modules/logs.js +++ b/src/render_modules/logs.js @@ -2,9 +2,6 @@ import { options } from "./options.js"; const logList = []; -/** - * 暴露日志打印方法 - */ window.LT_logs = () => { if (options.debug.console) { logList.forEach((el) => {