0.1.0 • Published 1 year ago

@ifun-vue2/pdf v0.1.0

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

安装

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说明默认值
urlStringpdf 文档地址,需要同源
dataTypedArray\|ArrayBuffer,二进制数据、base64(需要atob()
其他...
0.1.0

1 year ago