0.1.4 • Published 3 years ago

vue-preview-pdf v0.1.4

Weekly downloads
43
License
-
Repository
github
Last release
3 years ago

VueTextExpand

Vue组件,用于预览PDF文件。

安装

$ npm i -S @cleexiaohui/vue-preview-pdf

使用

import Vue from 'vue'
import VuePreviewPDF from '@cleexiaohui/vue-preview-pdf'

Vue.use(VuePreviewPDF)

new Vue({
  data: {
    url: 'path/to/your/file.pdf',
  },
})
<vue-preview-pdf :url="url" />

自定义Loading

<vue-preview-pdf :url="url" customLoading>
  <section slot="loading" slot-scope="scope">
    {{ scope.loading ? '加载中...' : '加载完成' }}
  </section>
</vue-preview-pdf>

自定义Pager

<vue-preview-pdf :url="url" customPager>
  <section slot="pager" slot-scope="scope" >
    <span>当前在第{{scope.current}}页</span>
    <span>共{{scope.total}}页</span>
  </section>
</vue-preview-pdf>

属性

参数说明类型可选值默认值
urlPDF下载链接string————
width容器宽度string——100%
height容器高度string——100%
background容器背景色string——#fff
custonLoading使用自定义Loadingboolean——false
customPager使用自定义Pagerboolean——false
disabledDownload禁止用户下载boolean——false
0.1.4

3 years ago

0.1.0

3 years ago

0.1.2

3 years ago

0.1.1

3 years ago

0.0.9

3 years ago

0.1.3

3 years ago

0.0.8

3 years ago

0.0.7

3 years ago

0.0.6

3 years ago

0.0.5

3 years ago

0.0.4

3 years ago

0.0.3

3 years ago

0.0.2

3 years ago

0.0.1

3 years ago