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
| <template>
| <div class="office-wrapper">
| <iframe :src="url" class="previewBody"></iframe>
| </div>
| </template>
|
| <script lang="ts">
| export default {
| name: 'PreviewOffice',
| };
| </script>
|
| <script setup lang="ts">
| import { computed } from 'vue';
|
| type Props = {
| fileUrl: string;
| };
|
| const props = defineProps<Props>();
|
| const url = computed(
| () => `https://view.officeapps.live.com/op/view.aspx?src=${props.fileUrl}?${Date.now()}`
| );
| </script>
|
|