<script setup lang="ts">
import type { ContestBookItem } from '../types'
import Preview from '@/components/Preview.vue'

interface Props {
  data: ContestBookItem
}
const props = defineProps<Props>()

const file = $computed(() => {
  return JSON.parse(props.data.url)
})
</script>

<template>
  <el-dialog title="查阅大赛试题">
    <Preview :url="file.url" style="height: 60vh"></Preview>
  </el-dialog>
</template>
