修复gantt图修改日视图后其他视图的pill左移的bug。优化字段默认宽度的逻辑

This commit is contained in:
mgw
2023-11-13 15:07:50 +08:00
parent a97ce9b0a7
commit 913780bc2b
2 changed files with 20 additions and 7 deletions

View File

@@ -774,7 +774,14 @@ var GanttRow = Widget.extend({
let index = 0;
for (const date of this.viewInfo.slots) {
const slotStart = date;
const slotStop = date.clone().add(8, interval);
// const slotStop = date.clone().add(8, interval);
let slotStop;
if (interval === "hour") {
slotStop = date.clone().add(8, "hour");
} else {
slotStop = date.clone().add(1, interval);
}
const isToday = date.isSame(new Date(), 'day') && this.state.scale !== 'day';
let slotStyle = '';