vue-pdf3
v1.1.1
Published
基于Vue3 + vite + PDF.js版的PDF预览插件
Downloads
23
Maintainers
Readme
vue-pdf3
基于Vue3 + vite + PDF.js版的PDF预览插件
安装
npm install --save vue-pdf3
全局引入
把安装好的vue-pdf3拷贝到 src/components 中
import pdf from './components/vue-pdf3';
app.use(pdf);
<script setup>
const url = "https://zuopengd.github.io/vue-pdf3/dist/欢迎使用WPS Office for Mac同步文件夹.pdf";
</script>
<template>
<pdf-preview :url="url" />
</template>
演示
浏览器支持
与 Vue.js 3 相同