This commit is contained in:
njdaoyehu 2025-01-08 12:55:18 +08:00
parent 10d52b2e3c
commit a555011735
4 changed files with 56984 additions and 1 deletions

View File

@ -12,3 +12,5 @@ VITE_GLOB_UPLOAD_URL=http://localhost:3920/v1/system/upload
# Interface prefix
VITE_GLOB_API_URL_PREFIX=
VITE_GLOB_WORK_SRC = ../../public/pdf.worker.mjs

View File

@ -18,3 +18,5 @@ VITE_GLOB_UPLOAD_URL=http://localhost:3920/v1/system/upload
# Interface prefix
VITE_GLOB_API_URL_PREFIX=
VITE_GLOB_WORK_SRC = ../pdf.worker.mjs

56979
public/pdf.worker.mjs Normal file

File diff suppressed because one or more lines are too long

View File

@ -35,7 +35,7 @@
import * as pdfjsLib from 'pdfjs-dist';
import {h} from "vue";
import {CloseOutlined, ScissorOutlined} from "@ant-design/icons-vue";
pdfjsLib.GlobalWorkerOptions.workerSrc = '../../../node_modules/pdfjs-dist/build/pdf.worker.mjs';
pdfjsLib.GlobalWorkerOptions.workerSrc = import.meta.env.VITE_GLOB_WORK_SRC;
export default {
name: 'PdfViewer',