From ef37c59e055a990ce247b265b27d3fcef430a243 Mon Sep 17 00:00:00 2001
From: 杨磊 <505174330@qq.com>
Date: 星期五, 15 八月 2025 10:19:18 +0800
Subject: [PATCH] first submit

---
 src/views/preview/pdf.vue |   69 ++++++++++++++++++++++++++++++++++
 1 files changed, 69 insertions(+), 0 deletions(-)

diff --git a/src/views/preview/pdf.vue b/src/views/preview/pdf.vue
new file mode 100644
index 0000000..3bb490f
--- /dev/null
+++ b/src/views/preview/pdf.vue
@@ -0,0 +1,69 @@
+<template>
+  <div class="global">
+    <div class="wrapIframe">
+      <iframe
+        class="iframe"
+        scrolling="no"
+        :src="config.pdfUrl"
+        @load="loadIframe"
+        allowfullscreen="true"
+        ref="iframeref"
+      ></iframe>
+    </div>
+  </div>
+</template>
+
+<script>
+import config from "@/assets/js/config";
+
+export default {
+  props: {
+    path: String
+  },
+  data() {
+    return {
+      currentPage: 1
+    };
+  },
+  mounted() {},
+  created() {
+    scrollTo(0, 0);
+    this.getData();
+  },
+  methods: {
+    getData() {},
+    loadIframe() {
+      let that = this;
+      that.$refs.iframeref.contentWindow.postMessage(
+        {
+          MD5: this.$route.query.md5,
+          url: that.config.requestCtx,
+          currentPage: that.currentPage,
+          index: 1,
+          token: true // 璐拱浜嗕紶,娌¤喘涔颁紶璇曡椤碉紝娌℃湁鐧诲綍浼爐rue
+        },
+        "*"
+      );
+    }
+  }
+};
+</script>
+
+<style scoped>
+.global {
+  width: 100%;
+  height: 100vh;
+  background: #333;
+  box-sizing: border-box;
+}
+.wrapIframe {
+  height: 100%;
+  box-sizing: border-box;
+}
+.iframe {
+  display: block;
+  width: 100%;
+  height: 100%;
+  border: medium none;
+}
+</style>

--
Gitblit v1.9.1