-
Notifications
You must be signed in to change notification settings - Fork 1
/
app.vue
49 lines (45 loc) · 1.08 KB
/
app.vue
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
<script setup lang="ts">
const { data } = await useFetch<{ licenseKey: string }>(
"/api/vpv-license-key"
);
const licenseKey = computed(() => data.value?.licenseKey);
</script>
<template>
<div :style="{ textAlign: 'center' }">
<ClientOnly>
<h1>VPV Starter Toolkit: Vue + Composition API + TypeScript</h1>
<br />
<h2>Default Toolbar</h2>
<div class="pdf-viewer-wrapper">
<PdfViewer />
</div>
<h2>Without Toolbar</h2>
<div class="pdf-viewer-wrapper no-toolbar">
<PdfViewer :toolbar-options="false" />
</div>
<h2>Mobile</h2>
<div class="pdf-viewer-wrapper-mobile">
<PdfViewer />
</div>
</ClientOnly>
<AppPdfViewer
title="Shared Component"
:license-key="licenseKey"
src="https://raw.githubusercontent.com/mozilla/pdf.js/ba2edeae/web/compressed.tracemonkey-pldi-09.pdf" />
</div>
</template>
<style scoped>
.pdf-viewer-wrapper {
width: 1028px;
height: 700px;
margin: 0 auto;
}
.pdf-viewer-wrapper-mobile {
width: 768px;
height: 700px;
margin: 0 auto;
}
.no-toolbar :deep(.vpv-variables) {
--vpv-toolbar-size: 0px;
}
</style>