|
|
@ -40,17 +40,18 @@ const openMethod = ref<'browser' | 'google' | undefined>() |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
|
|
<iframe |
|
|
|
<pdf-object |
|
|
|
v-if="openMethod === 'browser'" |
|
|
|
v-if="openMethod === 'browser'" |
|
|
|
:class="props.class" |
|
|
|
:class="props.class" |
|
|
|
:src="src[currentIndex]" |
|
|
|
:url="src[currentIndex]" |
|
|
|
width="100%" |
|
|
|
class="w-full h-full" |
|
|
|
height="100%" |
|
|
|
|
|
|
|
@error="handleError" |
|
|
|
@error="handleError" |
|
|
|
></iframe> |
|
|
|
/> |
|
|
|
|
|
|
|
|
|
|
|
<iframe |
|
|
|
<iframe |
|
|
|
v-else-if="openMethod === 'google'" |
|
|
|
v-else-if="openMethod === 'google'" |
|
|
|
:class="props.class" |
|
|
|
:class="props.class" |
|
|
|
|
|
|
|
type="application/pdf" |
|
|
|
:src="`https://docs.google.com/viewer?url=${encodeURIComponent(src[currentIndex])}&embedded=true`" |
|
|
|
:src="`https://docs.google.com/viewer?url=${encodeURIComponent(src[currentIndex])}&embedded=true`" |
|
|
|
width="100%" |
|
|
|
width="100%" |
|
|
|
height="100%" |
|
|
|
height="100%" |
|
|
|