|
1 | 1 | <script lang="ts"> |
| 2 | +import { pAspectRatio } from '@/directives/aspect-ratio' |
| 3 | +import { syncRef, templateRef, useToggle, useToNumber, useVModel, watchDebounced } from '@vueuse/core' |
2 | 4 | import type { PropType } from 'vue-demi' |
3 | 5 | import { computed, defineComponent, onMounted, provide, toRef, watch } from 'vue-demi' |
4 | | -import { pAspectRatio } from '@/directives/aspect-ratio' |
5 | | -import { templateRef, useToNumber, useVModel, watchDebounced, syncRef, useToggle } from '@vueuse/core' |
| 6 | +import PdfObjects from '../pdf-object/PdfObjects.vue' |
6 | 7 | import type { LayoutVariant } from './main' |
7 | 8 | import { PDF_VIEWER_CONTEXT } from './main' |
8 | | -import { useSticky } from './utils/use-sticky' |
9 | | -import PdfNavigation from './PdfNavigation.vue' |
10 | | -import PdfLoading from './PdfLoading.vue' |
11 | 9 | import PdfError from './PdfError.vue' |
| 10 | +import PdfLoading from './PdfLoading.vue' |
| 11 | +import PdfNavigation from './PdfNavigation.vue' |
12 | 12 | import { useIdle } from './utils/use-idle' |
13 | | -import PdfObjects from '../pdf-object/PdfObjects.vue' |
| 13 | +import { useSticky } from './utils/use-sticky' |
14 | 14 | import { useViewer } from './utils/use-viewer' |
15 | 15 |
|
16 | 16 | export default defineComponent({ |
@@ -100,9 +100,9 @@ export default defineComponent({ |
100 | 100 |
|
101 | 101 | watchDebounced( |
102 | 102 | () => [props.src, props.password], |
103 | | - ([src, password, workerSrc]) => { |
| 103 | + ([src, password]) => { |
104 | 104 | if (src) { |
105 | | - openDoc(src, password, workerSrc) |
| 105 | + openDoc(src, password, props.workerSrc) |
106 | 106 | } |
107 | 107 | }, |
108 | 108 | { debounce: 500 } |
|
0 commit comments