瀏覽代碼

919 JFlow微服务集成完成补充提交2

LT32820A 2 月之前
父節點
當前提交
8f3afdb8de
共有 1 個文件被更改,包括 20 次插入0 次删除
  1. 20 0
      jeecgboot-vue3/src/components/iFrame/index.vue

+ 20 - 0
jeecgboot-vue3/src/components/iFrame/index.vue

@@ -0,0 +1,20 @@
+<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>