mirror of
https://github.com/Wei-Shaw/claude-relay-service.git
synced 2026-01-23 00:53:33 +00:00
Merge branch 'dev' into main
合并dev分支的时区修复和其他改进: - 修复仪表板图表时区处理问题 - 修复自定义时间选择器的UTC转换 - 删除dist构建产物目录
This commit is contained in:
@@ -55,8 +55,12 @@ const createChart = () => {
|
||||
|
||||
const labels = dashboardStore.trendData.map(item => {
|
||||
if (granularity.value === 'hour') {
|
||||
const date = new Date(item.date)
|
||||
return `${date.getMonth() + 1}/${date.getDate()} ${date.getHours()}:00`
|
||||
// 小时粒度使用hour字段
|
||||
const date = new Date(item.hour)
|
||||
const month = String(date.getMonth() + 1).padStart(2, '0')
|
||||
const day = String(date.getDate()).padStart(2, '0')
|
||||
const hour = String(date.getHours()).padStart(2, '0')
|
||||
return `${month}/${day} ${hour}:00`
|
||||
}
|
||||
return item.date
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user