Browse Source

fix: opacity not updating

pull/8990/head
DarkPhoenix2704 4 months ago
parent
commit
fa2195b993
No known key found for this signature in database
GPG Key ID: 3F76B10622A07849
  1. 8
      packages/nc-gui/components/cell/attachment/Carousel.vue

8
packages/nc-gui/components/cell/attachment/Carousel.vue

@ -132,7 +132,7 @@ watchOnce(emblaMainApi, async (emblaMainApi) => {
> >
<NcCarouselContent> <NcCarouselContent>
<NcCarouselItem v-for="(item, index) in visibleItems" :key="index"> <NcCarouselItem v-for="(item, index) in visibleItems" :key="index">
<div class="justify-center w-full h-full flex items-center"> <div v-if="selectedIndex === index" class="justify-center w-full h-full flex items-center">
<LazyCellAttachmentPreviewImage <LazyCellAttachmentPreviewImage
v-if="isImage(item.title, item.mimeType)" v-if="isImage(item.title, item.mimeType)"
class="nc-attachment-img-wrapper" class="nc-attachment-img-wrapper"
@ -189,11 +189,7 @@ watchOnce(emblaMainApi, async (emblaMainApi) => {
v-for="(item, index) in visibleItems" v-for="(item, index) in visibleItems"
:key="index" :key="index"
:class="{ :class="{
'opacity-100': index === selectedIndex, '!opacity-100': index === selectedIndex,
'!basis-1/2': visibleItems.length === 2,
'!basis-1/3': visibleItems.length === 3,
'!basis-1': visibleItems.length === 1,
'!basis-1/4': visibleItems.length === 4,
'!basis-1/8': visibleItems.length > 4, '!basis-1/8': visibleItems.length > 4,
}" }"
class="px-2 keep-open opacity-50 cursor-pointer" class="px-2 keep-open opacity-50 cursor-pointer"

Loading…
Cancel
Save