Browse Source

chore(nc-gui): use nuxt img

pull/3801/head
braks 2 years ago
parent
commit
fc343f8583
  1. 4
      packages/nc-gui/components/cell/attachment/Carousel.vue
  2. 2
      packages/nc-gui/components/cell/attachment/index.vue
  3. 3
      packages/nc-gui/components/smartsheet/Gallery.vue

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

@ -82,7 +82,9 @@ onClickOutside(carouselRef, () => {
<template #customPaging="props">
<a>
<nuxt-img
<LazyNuxtImg
quality="90"
placeholder
class="!block"
:alt="imageItems[props.i].title || `#${props.i}`"
:src="imageItems[props.i].url || imageItems[props.i].data"

2
packages/nc-gui/components/cell/attachment/index.vue

@ -180,7 +180,7 @@ const { isSharedForm } = useSmartsheetStoreOrThrow()
<div class="text-center w-full">{{ item.title }}</div>
</template>
<nuxt-img
<LazyNuxtImg
v-if="isImage(item.title, item.mimetype ?? item.type) && (item.url || item.data)"
quality="75"
placeholder

3
packages/nc-gui/components/smartsheet/Gallery.vue

@ -187,9 +187,10 @@ provide(ReloadRowDataHookInj, reloadViewDataHook)
<template #nextArrow>
<div style="z-index: 1"></div>
</template>
<nuxt-img
<LazyNuxtImg
v-for="(attachment, index) in attachments(record)"
:key="`carousel-${record.row.id}-${index}`"
quality="90"
placeholder
class="h-52 object-cover"
:src="attachment.url"

Loading…
Cancel
Save