0.1.47 • Published 5 years ago
qys-pdf-viewer v0.1.47
qys-pdf-viewer
Project setup
yarn install
Compiles and hot-reloads for development
yarn run serve
Compiles and minifies for production
yarn run build
Run your tests
yarn run test
Lints and fixes files
yarn run lint
使用方式
props: {
url: string // pdf地址
cMapUrl: string // 字体解析包的请求地址
visibleHeader: boolean // 是否渲染头部控制区域(缩放、翻页等 后期可提供插槽)
watermarkText: string // 水印文字
}
listeners: {
// 拖动事件相关
on-drop: (e, pageNo) => void
on-drag-over: (e, pageNo) => void
on-drag-leave: (e, pageNo) => void
// 文档渲染事件
document-rendered: ()=> void // 渲染成功
document-render-error: () => void // 渲染失败
// 单页渲染事件
page-rendered: (pageNo) => void
page-render-error: (pageNo) => void
}
$slot
slot-scope="{ pageNumber }"
提供插槽,插槽具有页码信息
<pdf :url="`/document/download/${id}?QID=5264b718-764e-45cf-8c5a-940b3aefc991`"
visible-header
@on-drop="onDrop"
@on-drag-over="onDrop"
@on-drag-leave="onDrop">
<template slot-scope="scope">
<div class="aaa"
draggable>
{{scope.pageNumber}}
</div>
</template>
</pdf>
Customize configuration
0.1.47
5 years ago
0.1.45
5 years ago
0.1.44
5 years ago
0.1.43
5 years ago
0.1.42
5 years ago
0.1.41
5 years ago
0.1.40
5 years ago
0.1.39
5 years ago
0.1.38
5 years ago
0.1.37
5 years ago
0.1.36
5 years ago
0.1.35
5 years ago
0.1.34
5 years ago
0.1.33
5 years ago
0.1.32
5 years ago
0.1.31
5 years ago
0.1.30
5 years ago
0.1.29
5 years ago
0.1.28
5 years ago
0.1.27
5 years ago
0.1.26
5 years ago
0.1.25
5 years ago
0.1.24
5 years ago
0.1.23
5 years ago
0.1.22
5 years ago
0.1.21
5 years ago
0.1.20
5 years ago
0.1.19
5 years ago
0.1.18
5 years ago
0.1.17
5 years ago
0.1.16
5 years ago
0.1.15
5 years ago
0.1.14
5 years ago
0.1.13
5 years ago
0.1.12
5 years ago
0.1.11
5 years ago
0.1.10
5 years ago
0.1.9
5 years ago
0.1.8
5 years ago
0.1.7
5 years ago
0.1.6
5 years ago
0.1.5
5 years ago
0.1.4
5 years ago
0.1.3
5 years ago
0.1.2
5 years ago
0.1.1
5 years ago
0.1.0
5 years ago