<template>
  <div>
    <img
      v-for="(item, index) in imgs?.filter(Boolean)"
      :key="index"
      v-viewer
      :src="item.filePath ? fileUrl + item.filePath : fileUrl + item"
      class="ml-10"
      width="100"
      height="100"
      alt=""
    />
  </div>
</template>

<script setup>
import { getFileUrl } from "../../utils/index.js";

defineOptions({
  name: "AppPreviewImg",
});
defineProps({
  imgs: { type: Array, required: true },
});
const fileUrl = getFileUrl();
</script>

<style scoped lang="scss"></style>
