Skip to content

Commit

Permalink
fix: disabled 没有页面是;右键 打印功能
Browse files Browse the repository at this point in the history
  • Loading branch information
lin.zehong committed Dec 8, 2023
1 parent 00be3f2 commit 6177da3
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
.dumi/tmp-test
.dumi/tmp-production
.env.local
.umi

# ide
/.vscode
Expand Down
6 changes: 6 additions & 0 deletions packages/pdf-viewer/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# @orca-fe/pdf-viewer

## 1.21.1

### Patch Changes

- fix: disabled 没有页面是;右键 打印功能

## 1.21.0

### Minor Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/pdf-viewer/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@orca-fe/pdf-viewer",
"version": "1.21.0",
"version": "1.21.1",
"description": "PDF Viewer",
"keywords": [
"react",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ const PdfContextPrintPlugin = (props: PdfContextPrintPluginProps) => {
key: 'print',
text: locale.printCurrentFile || '打印当前文件',
icon: <PrinterOutlined />,
disabled: pdfViewer.getPageCount() <= 0,
onClick: async () => {
const data = await pdfViewer.getPDFInstance()?.getData();
if (data) {
Expand Down

0 comments on commit 6177da3

Please sign in to comment.