2023-04-03 00:26:04 +08:00
|
|
|
<template>
|
|
|
|
<div v-loading="loading" :style="'height:' + height">
|
|
|
|
<iframe :src="url" frameborder="no" style="width: 100%; height: 100%" scrolling="auto" />
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
2023-04-02 01:01:56 +08:00
|
|
|
<script setup lang="ts">
|
2023-06-06 22:52:24 +08:00
|
|
|
import { propTypes } from '@/utils/propTypes';
|
|
|
|
|
2023-03-15 15:59:21 +08:00
|
|
|
const props = defineProps({
|
2023-06-06 22:52:24 +08:00
|
|
|
src: propTypes.string.isRequired
|
2023-12-13 01:01:52 +00:00
|
|
|
});
|
2023-03-15 15:59:21 +08:00
|
|
|
|
2023-12-13 01:01:52 +00:00
|
|
|
const height = ref(document.documentElement.clientHeight - 94.5 + 'px;');
|
|
|
|
const loading = ref(true);
|
|
|
|
const url = computed(() => props.src);
|
2023-03-15 15:59:21 +08:00
|
|
|
|
|
|
|
onMounted(() => {
|
|
|
|
setTimeout(() => {
|
|
|
|
loading.value = false;
|
|
|
|
}, 300);
|
|
|
|
window.onresize = function temp() {
|
2023-12-13 01:01:52 +00:00
|
|
|
height.value = document.documentElement.clientHeight - 94.5 + 'px;';
|
2023-03-15 15:59:21 +08:00
|
|
|
};
|
2023-12-13 01:01:52 +00:00
|
|
|
});
|
2023-03-15 15:59:21 +08:00
|
|
|
</script>
|