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