YNUtdPlatform/pages/YNEduApp/learnProj/components/PdfView.vue

30 lines
532 B
Vue

<template>
<pdf-view>
<web-view :src="allUrl"></web-view>
</pdf-view>
</template>
<script>
export default {
props: {
path: {
type: String,
default: ''
}
},
data() {
return {
allUrl: '',
// viewerUrl: '/static/pdfjs/web/viewer.html'
viewerUrl: '/static/PDF.html'
}
},
mounted() {
this.allUrl = this.viewerUrl + '?file=' + '/static/image/textpdf.pdf'
console.log('🚀 ~ mounted ~ this.allUrl:', this.allUrl)
}
}
</script>
<style lang="scss" scoped></style>