vue3-webpack-pdf
v1.0.2
Published
基于Vue3 + webpack + PDF.js版的PDF预览插件
Downloads
10
Maintainers
Readme
vue3-webpack-pdf
基于Vue3 + webpack + PDF.js版的PDF预览插件
安装
npm install --save vue3-webpack-pdf
全局引入
import { createApp } from "vue";
import pdf from 'vue3-webpack-pdf';
const app = createApp(App);
app
.use(pdf)
.mount("#app");
<template>
<div id="app">
<pdf-preview :url="url" />
</div>
</template>
<script setup>
import { ref } from "vue";
const url = ref("https://zuopengd.github.io/vue-pdf3/dist/欢迎使用WPS Office for Mac同步文件夹.pdf");
</script>
演示
浏览器支持
与 Vue.js 3 相同