Browse Source

refactor(nc-gui): use MdiFileImageBox for fallback

pull/5046/head
Wing-Kam Wong 2 years ago
parent
commit
158cce40c0
  1. 10
      packages/nc-gui/components/cell/attachment/Image.vue

10
packages/nc-gui/components/cell/attachment/Image.vue

@ -14,11 +14,19 @@ const onError = () => index.value++
<template>
<LazyNuxtImg
v-if="index < props.src.length"
class="nc-attachment-img"
:src="props.src[index]"
:onerror="onError"
:alt="props?.alt || ''"
placeholder
quality="75"
/>
<img v-else src="~/assets/img/file-not-found.png" />
<MdiFileImageBox v-else />
</template>
<style scoped lang="scss">
.nc-attachment-img {
width: fit-content !important;
@apply m-auto;
}
</style>

Loading…
Cancel
Save