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

Loading…
Cancel
Save