We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 09d3703 commit 4a7554bCopy full SHA for 4a7554b
.apps/tools/src/views/PdfViewer.vue
@@ -1,10 +1,29 @@
1
<template>
2
- <input type="file" @change="e => handleViewClick(e.target.files[0])">
+ <div class="box">
3
+ <input class="form-control" type="file" @change="e => handleViewClick(e.target.files[0])">
4
+ <iframe class="frame" :src></iframe>
5
+ </div>
6
</template>
7
8
<script setup>
9
+const src = ref();
10
function handleViewClick(file)
11
{
- location.href = `/pdfviewer/web/viewer.html?file=${URL.createObjectURL(file)}`;
12
+ src.value = `/pdfviewer/web/viewer.html?file=${URL.createObjectURL(file)}`;
13
}
14
</script>
15
+
16
+<style scoped>
17
+.box {
18
+ position: fixed;
19
+ top: 0;
20
+ right: 0;
21
+ bottom: 0;
22
+ left: 0;
23
+ display: flex;
24
+ flex-direction: column;
25
+}
26
+.frame {
27
+ flex: auto;
28
29
+</style>
0 commit comments