Skip to content

Commit

Permalink
pdf-view version 1.0.7
Browse files Browse the repository at this point in the history
  • Loading branch information
xujiujiu committed Jan 16, 2025
1 parent 994f9b7 commit 86ac13a
Show file tree
Hide file tree
Showing 16 changed files with 604 additions and 840 deletions.
12 changes: 9 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@ npm install pdfview-dist
+ 引入js

```html
<script src="pdfview-dist/index.js" type="text/javascript" charset="utf-8"></script>
<script src="pdfview-dist/dist-umd/index.js" type="text/javascript" charset="utf-8"></script>
```

+ 引入css(仅在使用[模块调用模式](#方式2模块调用模式)需要)

```html
<link rel="stylesheet" href="pdfview-dist/dist/index.css" />
<link rel="stylesheet" href="pdfview-dist/dist-umd/index.css" />
```

+ 注册组件
Expand Down Expand Up @@ -60,7 +60,7 @@ PdfViewRegistry('pdf-view')
```js
import { PdfViewLib } "pdfview-dist";
import 'pdfview-dist/dist/index.css';
import 'pdfview-dist/dist-umd/index.css';
```

在页面中正常使用
Expand Down Expand Up @@ -176,6 +176,12 @@ created() {
| goto | Number | | 跳转第几页 |
| clearPdf | | | 清除 pdf 渲染内容 |

## vite 项目中使用

在 vite 项目中使用时,若想直接使用js文件时,需要通过`pdfview-dist/dist-esm/index.js` 的方式进行引用。

若通过npm包的方式引用时,则不需要考虑 `dist-esm` 文件夹,直接使用`pdfview-dist` 即可。


# 兼容性:

Expand Down
1 change: 1 addition & 0 deletions dist-esm/index.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

239 changes: 239 additions & 0 deletions dist-esm/index.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions dist-umd/index.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 86ac13a

Please sign in to comment.