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

30 lines
532 B
Vue
Raw Normal View History

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