mirror of https://github.com/nocodb/nocodb
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
428 B
25 lines
428 B
2 years ago
|
<script setup lang="ts">
|
||
|
interface Props {
|
||
|
src: string[]
|
||
|
alt?: string
|
||
|
}
|
||
|
|
||
|
const props = defineProps<Props>()
|
||
|
|
||
|
const index = ref(0)
|
||
|
|
||
|
const onError = () => index.value++
|
||
|
</script>
|
||
|
|
||
|
<template>
|
||
|
<LazyNuxtImg
|
||
|
v-if="index < props.src.length"
|
||
|
:src="props.src[index]"
|
||
|
:onerror="onError"
|
||
|
:alt="props?.alt || ''"
|
||
|
placeholder
|
||
|
quality="75"
|
||
|
/>
|
||
|
<img v-else src="~/assets/img/file-not-found.png" />
|
||
|
</template>
|