fix: fix balance history chart

This commit is contained in:
Rogee
2024-12-16 23:26:07 +08:00
parent d4cc04d254
commit 0a8732ae57

View File

@@ -47,10 +47,10 @@ export default defineComponent({
const second = date.getUTCSeconds();
// 按照要求格式输出
let formattedTime = `${year}/${month}/${day} ${hour}:${minute}:${second}`;
let formattedTime = `${year}/${month}/${day}`;
// 如果是同一年份则不显示年份
if (new Date().getUTCFullYear() === year) {
formattedTime = `${month}/${day} ${hour}${minute}:${second}`;
formattedTime = `${month}/${day} ${hour}:${minute}`;
}
return formattedTime;
}