<template>
  <qm-dialog
    v-if="store.setting.uiSetting['paper.modal']"
    top="10%"
    width="700px"
    height="400px"
    title="试卷"
    @close="close"
  >
    <object
      :data="paperPDFUrl"
      type="application/pdf"
      frameBorder="0"
      scrolling="auto"
      height="100%"
      width="100%"
      toolbar="1"
    />
  </qm-dialog>
</template>

<script setup lang="ts">
import { computed } from "vue";
import { store } from "./store";

const paperPDFUrl = computed(() => {
  return store.setting.subject.paperUrl;
});
const close = () => {
  store.setting.uiSetting["paper.modal"] = false;
};
</script>
