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

Loading…
Cancel
Save