Skip to content

Commit

Permalink
pdf-view version 1.0.4
Browse files Browse the repository at this point in the history
  • Loading branch information
xujiujiu committed Dec 4, 2024
1 parent e84ba5c commit 60649fa
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@

安装依赖
```
npm i pdfview
npm i pdfview-dist
```
模块提供了2种使用方式,支持一些不支持使用 webComponent 的 场景

### webcomponent 组件注册模式

```js
import { PdfViewRegistry } "pdfview"
import { PdfViewRegistry } "pdfview-dist"
// 注册自定义组件名
PdfViewRegistry('pdf-view')
```
Expand Down Expand Up @@ -80,9 +80,9 @@ const App = {
created() {
// 具体参数参考 https://webpack.js.org/api/module-methods/#magic-comments
import(
/* webpackChunkName: "pdfview" */
/* webpackChunkName: "pdfview-dist" */
/* webpackPrefetch: true */
"pdfview").then(module => {
"pdfview-dist").then(module => {
// webcomponent 组件注册模式
module.PdfViewRegistry('pdf-view')
this.componentLoaded = true
Expand Down

0 comments on commit 60649fa

Please sign in to comment.