123456789101112131415161718192021 |
- <template>
- <view>
- <web-view class="web-view" :src="pdfUrl"></web-view>
- </view>
- </template>
- <script>
- export default {
- data() {
- return {
- pdfUrl: ''
- };
- },
- onLoad(options) {
- const { fileUrl } = options;
- if (fileUrl) {
- this.pdfUrl = `/static/pdf/web/viewer.html?file=${ encodeURIComponent(fileUrl) }`;
- }
- },
- };
- </script>
|