Merge pull request #280 from nightcp/fix-ganntt-timeline-error

fix(gantt): 修复甘特图时间轴计算错误
This commit is contained in:
kuaifan 2025-08-19 18:00:43 +08:00 committed by GitHub
commit eb3524a22d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -159,10 +159,10 @@ export default {
//00:00:00
let nowDay = $A.daytz().startOf('day');
//
let curDay = nowDay.clone().add(mouseDay, 'day');
let curDay = nowDay.clone().add(Math.floor(mouseDay), 'day');
//
if (index > 0) {
curDay = curDay.add(index + 1, 'month');
curDay = curDay.add(index, 'month');
}
return curDay.format('YYYY-MM')
}