From e4b2c66f9a91d345e3dd12bab81a6cffcad757e2 Mon Sep 17 00:00:00 2001 From: yupeng12 Date: Wed, 29 May 2024 15:36:55 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=20pdfjs-dist=20=E5=A3=B0?= =?UTF-8?q?=E6=98=8E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/amis-ui/src/components/PdfViewer.tsx | 1 - types/pdfjs-dist/index.d.ts | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) create mode 100644 types/pdfjs-dist/index.d.ts diff --git a/packages/amis-ui/src/components/PdfViewer.tsx b/packages/amis-ui/src/components/PdfViewer.tsx index 36544d785..85d99d78a 100644 --- a/packages/amis-ui/src/components/PdfViewer.tsx +++ b/packages/amis-ui/src/components/PdfViewer.tsx @@ -11,7 +11,6 @@ import {Document, Page, pdfjs} from 'react-pdf'; import {Icon} from './icons'; import Input from './Input'; import Spinner from './Spinner'; -// @ts-ignore import pdfJSWorkerURL from 'pdfjs-dist/build/pdf.worker.min'; pdfjs.GlobalWorkerOptions.workerSrc = pdfJSWorkerURL; diff --git a/types/pdfjs-dist/index.d.ts b/types/pdfjs-dist/index.d.ts new file mode 100644 index 000000000..23954727e --- /dev/null +++ b/types/pdfjs-dist/index.d.ts @@ -0,0 +1 @@ +declare module 'pdfjs-dist/build/pdf.worker.min';