Browse Source

fix(nc-gui): use LazyCellAttachmentImage for images only

pull/5046/head
Wing-Kam Wong 2 years ago
parent
commit
288578a96c
  1. 15
      packages/nc-gui/components/smartsheet/Kanban.vue

15
packages/nc-gui/components/smartsheet/Kanban.vue

@ -13,6 +13,7 @@ import {
MetaInj, MetaInj,
OpenNewRecordFormHookInj, OpenNewRecordFormHookInj,
inject, inject,
isImage,
isLTAR, isLTAR,
onBeforeMount, onBeforeMount,
onBeforeUnmount, onBeforeUnmount,
@ -459,12 +460,14 @@ watch(view, async (nextView) => {
<div style="z-index: 1"></div> <div style="z-index: 1"></div>
</template> </template>
<LazyCellAttachmentImage <template v-for="(attachment, index) in attachments(record)">
v-for="(attachment, index) in attachments(record)" <LazyCellAttachmentImage
:key="`carousel-${record.row.id}-${index}`" v-if="isImage(attachment.title, attachment.mimetype ?? attachment.type)"
class="h-52 object-cover" :key="`carousel-${record.row.id}-${index}`"
:src="getPossibleAttachmentSrc(attachment)" class="h-52 object-cover"
/> :src="getPossibleAttachmentSrc(attachment)"
/>
</template>
</a-carousel> </a-carousel>
<MdiFileImageBox v-else class="w-full h-48 my-4 text-cool-gray-200" /> <MdiFileImageBox v-else class="w-full h-48 my-4 text-cool-gray-200" />

Loading…
Cancel
Save