![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
pdf-viewer-vue3
Advanced tools
一款Vue3框架开发的pdf阅读器组件
<script setup>
import { ref } from 'vue';
import PDF from 'pdf-viewer-vue3';
import 'pdf-viewer-vue3/package/pdf-viewer.css';
const fileInput = ref();
const pdfComp = ref();
async function handleFileChange(event) {
const files = event.target.files;
const file = files[0];
if (file) {
// loadFile支持buffer数据,也支持解决了跨域问题的文件地址链接(cors支持的文件地址或者在您的项目中nginx代理转发的下载地址都可以)
const buffer = await file.arrayBuffer();
pdfComp.value?.loadFile(buffer);
console.log(pdfComp.value);
// 会把pdfjs和pdfViewer等暴露出来
// 可以自定义绑定pdfjs和pdfViewer内部事件、数据和方法
}
}
function openFile() {
fileInput.value?.click();
}
</script>
<template>
<div>
<button @click="openFile">选择文件</button>
<input v-show="false" ref="fileInput" type="file" @change="handleFileChange">
<PDF
ref="pdfComp"
@pagesLoaded="(v) => console.log('pagesLoaded 全部页面加载完', v)"
@pageRendered="(v) => console.log('pageRendered 单页渲染', v)"
@pageChanging="(v) => console.log('pageChanging 当前页改变', v)"
@findChange="(v) => console.log('findChange 查找改变', v)"
style="width: 800px; height: 500px; margin: auto;"
></PDF>
</div>
</template>
<style scoped>
</style>
FAQs
一款Vue3框架开发的pdf阅读器组件,如果您使用的是Vue2,可以查看[Vue2PDF阅读器组件地址](https://www.npmjs.com/package/pdf-viewer-vue2)
The npm package pdf-viewer-vue3 receives a total of 71 weekly downloads. As such, pdf-viewer-vue3 popularity was classified as not popular.
We found that pdf-viewer-vue3 demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.