|
|
|
|
@ -334,9 +334,9 @@ import addCalendar from './components/addCalendar.vue'
|
|
|
|
|
: (adjStart.getDay() - FIRST_DOW + 7) % 7
|
|
|
|
|
|
|
|
|
|
const cellWidth = 100 / 7
|
|
|
|
|
const cellHeight = 100
|
|
|
|
|
const cellHeight = 120 // 调整格子高度,确保有足够空间
|
|
|
|
|
const headerHeight = 50
|
|
|
|
|
const dateNumberHeight = 25
|
|
|
|
|
const dateNumberHeight = 40 // 调整日期数字高度,确保有足够空间
|
|
|
|
|
const eventHeight = 16
|
|
|
|
|
const eventSpacing = 2
|
|
|
|
|
const verticalOffset = (event.laneIndex || 0) * (eventHeight + eventSpacing)
|
|
|
|
|
@ -344,7 +344,7 @@ import addCalendar from './components/addCalendar.vue'
|
|
|
|
|
return {
|
|
|
|
|
position: 'absolute',
|
|
|
|
|
left: `calc(${startColAdjusted * cellWidth}% + 2px)`,
|
|
|
|
|
top: `${headerHeight + weekRow * cellHeight + dateNumberHeight + verticalOffset}px`,
|
|
|
|
|
top: `${headerHeight + weekRow * cellHeight + dateNumberHeight + 25 + verticalOffset}px`, // 增加偏移量到25px,确保课程标题完全在日期数字下方
|
|
|
|
|
width: `calc(${event.spanCols * cellWidth}% - 4px)`,
|
|
|
|
|
height: `${eventHeight}px`,
|
|
|
|
|
zIndex: 1000,
|
|
|
|
|
@ -417,7 +417,7 @@ import addCalendar from './components/addCalendar.vue'
|
|
|
|
|
return {
|
|
|
|
|
position: 'absolute',
|
|
|
|
|
left: '0',
|
|
|
|
|
top: '1px',
|
|
|
|
|
top: '105px', // 使用固定值:headerHeight(50) + dateNumberHeight(40) + 15px = 105px,确保完全在日期数字下方
|
|
|
|
|
width: `calc(${spanDays * 100}% - 2px)`,
|
|
|
|
|
zIndex: 10,
|
|
|
|
|
background: `linear-gradient(90deg, ${bgColor} 0%, ${this.darkenColor(bgColor)} 100%)`,
|
|
|
|
|
|