官方文档参考:https://www.npmjs.com/package/vue-pdf
1.
cnpm install --save vue-pdf
2.components.vue
<template> <pdf src="./static/relativity.pdf"></pdf> </template> <script> import pdf from ‘vue-pdf‘ export default { components: { pdf } }
原文地址:https://www.cnblogs.com/yingyigongzi/p/10886515.html
时间: 2024-11-05 13:03:39