fix: time format in balance history
This commit is contained in:
@@ -46,12 +46,9 @@ export default defineComponent({
|
||||
const minute = date.getUTCMinutes();
|
||||
const second = date.getUTCSeconds();
|
||||
|
||||
// 按照要求格式输出
|
||||
let formattedTime = `${year}/${month}/${day}`;
|
||||
// 如果是同一年份则不显示年份
|
||||
if (new Date().getUTCFullYear() === year) {
|
||||
formattedTime = `${month}/${day} ${hour}:${minute}`;
|
||||
}
|
||||
// 格式化时间为 2021/1/1 12:00:00
|
||||
const formattedTime = `${year}/${month}/${day} ${hour}:${minute}:${second}`;
|
||||
|
||||
return formattedTime;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user