From ce7f6d149ab8a1f21bd22515adf43aea26db1e25 Mon Sep 17 00:00:00 2001 From: DarkPhoenix2704 Date: Wed, 20 Nov 2024 17:43:13 +0000 Subject: [PATCH] fix:support overlap --- .../smartsheet/calendar/DayView/DateTimeField.vue | 5 +++-- .../components/smartsheet/calendar/SideMenu.vue | 3 ++- .../components/smartsheet/calendar/VRecordCard.vue | 10 ++++++++-- .../smartsheet/calendar/WeekView/DateTimeField.vue | 14 ++++++++++++-- 4 files changed, 25 insertions(+), 7 deletions(-) diff --git a/packages/nc-gui/components/smartsheet/calendar/DayView/DateTimeField.vue b/packages/nc-gui/components/smartsheet/calendar/DayView/DateTimeField.vue index dbaddab4c5..4eb7d250dc 100644 --- a/packages/nc-gui/components/smartsheet/calendar/DayView/DateTimeField.vue +++ b/packages/nc-gui/components/smartsheet/calendar/DayView/DateTimeField.vue @@ -444,8 +444,9 @@ const recordsAcrossAllRange = computed<{ record.rowMeta.style = { ...record.rowMeta.style, display, - width: `calc(${width.toFixed(2)}% - 8px)`, - left: `calc(${left.toFixed(2)}% + 4px)`, + width: `calc(max(${width.toFixed(2)}%, 180px))`, + left: `min(calc(${left.toFixed(2)}% + 4px), calc(100% - max(${width.toFixed(2)}%, 180px) + 4px))`, + minWidth: '180px', } } diff --git a/packages/nc-gui/components/smartsheet/calendar/SideMenu.vue b/packages/nc-gui/components/smartsheet/calendar/SideMenu.vue index b5f4efcc7d..6adaa0edfd 100644 --- a/packages/nc-gui/components/smartsheet/calendar/SideMenu.vue +++ b/packages/nc-gui/components/smartsheet/calendar/SideMenu.vue @@ -346,7 +346,8 @@ onClickOutside(searchRef, toggleSearch) 'right-2': !showSideMenu, 'right-74': showSideMenu, }" - class="absolute transition-all ease-in-out z-9 top-2" + style="z-index: 100" + class="absolute transition-all ease-in-out top-2" hide-on-click > diff --git a/packages/nc-gui/components/smartsheet/calendar/VRecordCard.vue b/packages/nc-gui/components/smartsheet/calendar/VRecordCard.vue index 10f216034d..522a31049b 100644 --- a/packages/nc-gui/components/smartsheet/calendar/VRecordCard.vue +++ b/packages/nc-gui/components/smartsheet/calendar/VRecordCard.vue @@ -27,9 +27,15 @@ const emit = defineEmits(['resize-start']) 'bg-pink-50': color === 'pink', 'bg-purple-50': color === 'purple', 'bg-white border-gray-200': color === 'gray', - 'shadow-md': hover, + 'z-90': hover, + }" + :style="{ + boxShadow: `${ + hover + ? 'box-0px 12px 16px -4px rgba(0, 0, 0, 0.10), 0px 4px 6px -2px rgba(0, 0, 0, 0.06)' + : ' 0px 2px 4px -2px rgba(0, 0, 0, 0.06), 0px 4px 4px -2px rgba(0, 0, 0, 0.02)' + }`, }" - style="box-shadow: 0px 2px 4px -2px rgba(0, 0, 0, 0.06), 0px 4px 4px -2px rgba(0, 0, 0, 0.02)" class="relative flex gap-2 border-1 relative rounded-md h-full" >