From 607a36a1fb8e4531e78f2e0e0cc9b3b5f809a332 Mon Sep 17 00:00:00 2001 From: bestlee Date: Fri, 4 Sep 2026 17:18:26 +0800 Subject: [PATCH] =?UTF-8?q?pdf=E9=A2=84=E8=A7=88=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 1 + pnpm-lock.yaml | 8 ++++++++ .../my/initiateChange/modules/changeApply.vue | 16 ++++++++++------ 3 files changed, 19 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index 4f965f6..d123ac6 100644 --- a/package.json +++ b/package.json @@ -71,6 +71,7 @@ "json5": "2.2.3", "naive-ui": "2.44.1", "nprogress": "0.2.0", + "pdf-vue3": "^2.0.1", "pinia": "3.0.4", "pinyin-pro": "3.28.0", "print-js": "1.6.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 591a448..ccb5f5e 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -92,6 +92,9 @@ importers: nprogress: specifier: 0.2.0 version: 0.2.0 + pdf-vue3: + specifier: ^2.0.1 + version: 2.0.1 pinia: specifier: 3.0.4 version: 3.0.4(typescript@6.0.3)(vue@3.5.34(typescript@6.0.3)) @@ -4734,6 +4737,9 @@ packages: resolution: {integrity: sha512-XDF38WCH3z5OV/OVa8GKUNtLAyneuzbCisx7QUCF8Q6Nutx0WnJrQe5O+kOtBlLfRNUws98Y58Lblp+NJG5T4Q==} hasBin: true + pdf-vue3@2.0.1: + resolution: {integrity: sha512-1hH48DEmJhSsHo27IFVp0aj97gkI1oe1Fvk6Xz1i8hNNkT6e2QrZ9fCmiVsL+I6bDCWL/e3LvskRTPRlflH5tw==} + pdfast@0.2.0: resolution: {integrity: sha512-cq6TTu6qKSFUHwEahi68k/kqN2mfepjkGrG9Un70cgdRRKLKY6Rf8P8uvP2NvZktaQZNF3YE7agEkLj0vGK9bA==} @@ -10737,6 +10743,8 @@ snapshots: ieee754: 1.2.1 resolve-protobuf-schema: 2.1.0 + pdf-vue3@2.0.1: {} + pdfast@0.2.0: {} pdfjs-dist@4.10.38: diff --git a/src/views/my/initiateChange/modules/changeApply.vue b/src/views/my/initiateChange/modules/changeApply.vue index 1f1970f..eb21b47 100644 --- a/src/views/my/initiateChange/modules/changeApply.vue +++ b/src/views/my/initiateChange/modules/changeApply.vue @@ -10,7 +10,7 @@ import { AiError, aiTypeJudge, aiLevelScore } from "@/service/api/ai"; import { uploadFileApi, deleteFileApi } from "@/service/api/file"; import Footer from './footer.vue' -import VuePdfEmbed from 'vue-pdf-embed'; +import PDF from 'pdf-vue3' import { VueOfficeDocx, VueOfficeExcel } from 'vue3-office-preview' import 'vue3-office-preview/lib/style.css' @@ -720,7 +720,7 @@ defineExpose({form}) :show="previewFile !== null" preset="card" :auto-focus="false" - :style="{ width: '1000px', height: 'auto' }" + :style="{ width: '1100px', height: 'auto' }" :segmented="{ content: true, footer: true }" @update:show="(v) => !v && (previewFile = null)" > @@ -736,10 +736,12 @@ defineExpose({form}) 上传时间:{{ previewFile?.created_at }} {{ `版本:${previewFile?.version}(受控)` }} -
+
@@ -772,7 +776,7 @@ defineExpose({form}) align-items: center; } .scroll { - height: calc(100vh - 393px); + height: calc(100vh - 395px); overflow-y: auto; } \ No newline at end of file