<template>
    <div class="hc-pdf-page-box">
        <hc-pdfs :url="pdfUrl" :code="pdfCode"/>
    </div>
</template>

<script setup>
import { onMounted, ref } from 'vue'
import { useRoute } from 'vue-router'

//初始变量
const useRoutes = useRoute()

defineOptions({
    name: 'Pdf',
})

//渲染完成
const pdfUrl = ref('')
const pdfCode = ref('')
onMounted(() => {
    const { url, code } = useRoutes.query
    pdfUrl.value = url
    pdfCode.value = code
})
</script>

<style scoped>
.hc-pdf-page-box {
    position: relative;
    height: 100%;
    width: 100%;
    overflow: hidden;
}
</style>
