0.1.0 • Published 1 year ago
@ifun-vue2/pdf v0.1.0
安装
npm i @ifun-vue2/pdf
使用
import IFunPdf from "@ifun-vue2/pdf";
// 样式
import "@ifun-vue2/Pdf/dist/style.css";
// 使用
Vue.use(IFunPdf);
特点
- 实现 pdf 文件的预览
基本使用,数据滚动
通过传入data
, 数据类型为数组。
<template>
<div>
<IFunPdf :options="options" />
</div>
</template>
<script>
export default {
data() {
return {
options: {
url: pdfUrl,
},
};
},
};
</script>
API 属性一览
props | 说明 | 默认值 |
---|---|---|
options | 初始化文档对象,同 APIgetDocument 参数一致 |
options
props | 说明 | 默认值 |
---|---|---|
url | String pdf 文档地址,需要同源 | |
data | TypedArray\|ArrayBuffer ,二进制数据、base64(需要atob() ) | |
其他... |
0.1.0
1 year ago