feat: 添加一个急需缩放功能的pdf插件
This commit is contained in:
1 parent
d5d9984ae5
commit
c595ebb260
5 files changed
+724
-26
No files matched your search
@@ -0,0 +1,34 @@
|
||||
<template>
|
||||
<div class="iframe-container">
|
||||
<iframe
|
||||
:src="iframeSrc"
|
||||
frameborder="0"
|
||||
class="iframe-container-iframe"></iframe>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { VirtualFile } from '@/class/VirtualDirectory'
|
||||
import { onMounted, ref } from 'vue'
|
||||
|
||||
const currentFiles = defineModel<VirtualFile[]>('currentFiles', {
|
||||
required: true
|
||||
})
|
||||
|
||||
const iframeSrc = ref<string>()
|
||||
|
||||
onMounted(() => {
|
||||
iframeSrc.value = currentFiles.value[0].url
|
||||
})
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.iframe-container {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
.iframe-container-iframe {
|
||||
width: inherit;
|
||||
height: inherit;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
Reference in new issue
Block a user