mirror of
https://github.com/nagisa77/OpenIsle.git
synced 2026-03-05 03:20:45 +08:00
feat(frontend): add time manager and unify date formats
This commit is contained in:
@@ -181,6 +181,7 @@ import { useRoute } from 'vue-router'
|
||||
import { API_BASE_URL } from '../main'
|
||||
import BaseTimeline from '../components/BaseTimeline.vue'
|
||||
import { stripMarkdown } from '../utils/markdown'
|
||||
import TimeManager from '../utils/time'
|
||||
import { hatch } from 'ldrs'
|
||||
hatch.register()
|
||||
|
||||
@@ -200,7 +201,7 @@ export default {
|
||||
|
||||
const formatDate = (d) => {
|
||||
if (!d) return ''
|
||||
return new Date(d).toLocaleDateString('zh-CN', { year: 'numeric', month: 'numeric', day: 'numeric' })
|
||||
return TimeManager.format(d)
|
||||
}
|
||||
|
||||
const fetchData = async () => {
|
||||
|
||||
Reference in New Issue
Block a user