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.
24 lines
492 B
24 lines
492 B
<script setup lang="ts"> |
|
interface Props { |
|
src: string[] |
|
class?: string |
|
} |
|
|
|
const props = defineProps<Props>() |
|
|
|
const currentIndex = ref(0) |
|
|
|
const handleError = () => { |
|
if (currentIndex.value < props.src.length - 1) { |
|
currentIndex.value = currentIndex.value + 1 |
|
} else { |
|
currentIndex.value = -1 |
|
} |
|
} |
|
</script> |
|
|
|
<template> |
|
<pdf-object :class="props.class" :url="src[currentIndex]" class="w-full h-full" @error="handleError" /> |
|
</template> |
|
|
|
<style scoped lang="scss"></style>
|
|
|