<template>
  <div class="fileDetailContent" style="height: calc(100% - 48px - 10px - 2rem);">
    <div class="h-full bg-white p-4 rounded-6px">
      <div class="title ml-4 mb-10px">{{ title }}查看</div>
      <div class="mx-10" style="height: calc(100% - 10px - 1rem);">
        <file-preview :url="fileUrl"></file-preview>
      </div>
    </div>
  </div>
</template>

<script setup>
import { userDetailStore } from "@/store/chapterDetail";
const detailStore = userDetailStore();
const title = ref(detailStore.detailTitle);
const fileUrl = ref(detailStore.detailUrl);
</script>

<style lang="scss" scoped>
.title {
  font-size: 16px;
  font-weight: 400;
  color: var(--el-color-primary);
  line-height: 22px;
}
</style>