Browse Source

fix: calendar ui fix

pull/9901/head
DarkPhoenix2704 4 days ago
parent
commit
b72f77f273
  1. 1
      packages/nc-gui/components/smartsheet/calendar/DayView/DateField.vue
  2. 2
      packages/nc-gui/components/smartsheet/calendar/MonthView.vue
  3. 7
      packages/nc-gui/components/smartsheet/calendar/RecordCard.vue
  4. 3
      packages/nc-gui/components/smartsheet/calendar/VRecordCard.vue
  5. 1
      packages/nc-gui/components/smartsheet/calendar/WeekView/DateField.vue
  6. 7
      packages/nc-gui/components/smartsheet/calendar/WeekView/DateTimeField.vue

1
packages/nc-gui/components/smartsheet/calendar/DayView/DateField.vue

@ -203,6 +203,7 @@ const newRecord = () => {
<div
:key="record.rowMeta.id"
class="mt-2"
style="line-height: 18px"
data-testid="nc-calendar-day-record-card"
@mouseleave="hoverRecord = null"
@mouseover="hoverRecord = record.rowMeta.id as string"

2
packages/nc-gui/components/smartsheet/calendar/MonthView.vue

@ -898,6 +898,8 @@ const addRecord = (date: dayjs.Dayjs) => {
:style="{
...record.rowMeta.style,
zIndex: record.rowMeta.id === draggingId ? 100 : 0,
lineHeight: '18px',
opacity:
(draggingId === null || record.rowMeta.id === draggingId) &&
(resizeRecord === null || record.rowMeta.id === resizeRecord?.rowMeta.id)

7
packages/nc-gui/components/smartsheet/calendar/RecordCard.vue

@ -106,4 +106,11 @@ const emit = defineEmits(['resize-start'])
.resize {
cursor: ew-resize;
}
.plain-cell {
line-height: 18px;
.bold {
@apply !text-gray-800 font-bold;
}
}
</style>

3
packages/nc-gui/components/smartsheet/calendar/VRecordCard.vue

@ -88,8 +88,9 @@ const emit = defineEmits(['resize-start'])
}
.plain-cell {
line-height: 18px;
.bold {
@apply !text-gray-800 font-semibold;
@apply !text-gray-800 font-bold;
}
}
</style>

1
packages/nc-gui/components/smartsheet/calendar/WeekView/DateField.vue

@ -548,6 +548,7 @@ const addRecord = (date: dayjs.Dayjs) => {
:data-unique-id="record.rowMeta.id"
:style="{
...record.rowMeta.style,
lineHeight: '18px',
}"
class="absolute group draggable-record pointer-events-auto nc-calendar-week-record-card"
@mouseleave="hoverRecord = null"

7
packages/nc-gui/components/smartsheet/calendar/WeekView/DateTimeField.vue

@ -550,12 +550,12 @@ const recordsAcrossAllRange = computed<{
left = width * (overlapIndex - 1)
width = Math.max((width / 100) * containerWidth.value - 8, 72)
width = Math.max((width / 100) * containerWidth.value, 72) - 8
left = majorLeft + (left / 100) * containerWidth.value + 4
left = majorLeft + (left / 100) * containerWidth.value + 4.5
if (majorLeft + perWidth < left + width) {
left = majorLeft + (perWidth - width - 4)
left = majorLeft + (perWidth - width) + 4
}
}
} else {
@ -1063,6 +1063,7 @@ watch(
:data-unique-id="record.rowMeta!.id"
:style="{
...record.rowMeta.style,
lineHeight: '18px',
opacity:
(dragRecord === null || record.rowMeta.id === dragRecord?.rowMeta.id) &&
(resizeRecord === null || record.rowMeta.id === resizeRecord?.rowMeta.id)

Loading…
Cancel
Save