diff --git a/.gitignore b/.gitignore index 72577de..7799e2e 100644 --- a/.gitignore +++ b/.gitignore @@ -19,6 +19,7 @@ .dumi/tmp-test .dumi/tmp-production .env.local +.umi # ide /.vscode diff --git a/packages/pdf-viewer/CHANGELOG.md b/packages/pdf-viewer/CHANGELOG.md index 59c2149..4bf551f 100644 --- a/packages/pdf-viewer/CHANGELOG.md +++ b/packages/pdf-viewer/CHANGELOG.md @@ -1,5 +1,11 @@ # @orca-fe/pdf-viewer +## 1.21.1 + +### Patch Changes + +- fix: disabled 没有页面是;右键 打印功能 + ## 1.21.0 ### Minor Changes diff --git a/packages/pdf-viewer/package.json b/packages/pdf-viewer/package.json index 8195fbb..737bba0 100644 --- a/packages/pdf-viewer/package.json +++ b/packages/pdf-viewer/package.json @@ -1,6 +1,6 @@ { "name": "@orca-fe/pdf-viewer", - "version": "1.21.0", + "version": "1.21.1", "description": "PDF Viewer", "keywords": [ "react", diff --git a/packages/pdf-viewer/src/plugins/PDFContextPrintPlugin/PdfContextPrintPlugin.tsx b/packages/pdf-viewer/src/plugins/PDFContextPrintPlugin/PdfContextPrintPlugin.tsx index 891cb4b..a124b32 100644 --- a/packages/pdf-viewer/src/plugins/PDFContextPrintPlugin/PdfContextPrintPlugin.tsx +++ b/packages/pdf-viewer/src/plugins/PDFContextPrintPlugin/PdfContextPrintPlugin.tsx @@ -18,6 +18,7 @@ const PdfContextPrintPlugin = (props: PdfContextPrintPluginProps) => { key: 'print', text: locale.printCurrentFile || '打印当前文件', icon: , + disabled: pdfViewer.getPageCount() <= 0, onClick: async () => { const data = await pdfViewer.getPDFInstance()?.getData(); if (data) {