<template>
  <div v-loading="loading" :style="'height:' + height">
    <iframe :src="src" frameborder="no" style="width: 100%; height: 100%" scrolling="auto"></iframe>
  </div>
</template>
<script lang="ts" setup>
  import { ref, onMounted } from 'vue';
  const loading = ref(true);
  const height = ref();
  defineProps({ src: String });
  onMounted(() => {
    setTimeout(() => {
      loading.value = false;
      height.value = window.innerHeight - 94.5 + 'px';
    }, 300);
    window.onresize = function temp() {
      height.value = window.innerHeight - 94.5 + 'px';
    };
  });
</script>
