From 3c4fee1db116c11d4f04727cfe076d7c94daeaf2 Mon Sep 17 00:00:00 2001 From: yanzhaofeige <yanzhaofeige@qq.com> Date: Mon, 30 Sep 2024 12:10:57 +0800 Subject: [PATCH] init --- cpzidc-ui/src/components/iFrame/index.vue | 36 ++++++++++++++++++++++++++++++++++++ 1 files changed, 36 insertions(+), 0 deletions(-) diff --git a/cpzidc-ui/src/components/iFrame/index.vue b/cpzidc-ui/src/components/iFrame/index.vue new file mode 100644 index 0000000..426857f --- /dev/null +++ b/cpzidc-ui/src/components/iFrame/index.vue @@ -0,0 +1,36 @@ +<template> + <div v-loading="loading" :style="'height:' + height"> + <iframe + :src="src" + frameborder="no" + style="width: 100%; height: 100%" + scrolling="auto" + /> + </div> +</template> +<script> +export default { + props: { + src: { + type: String, + required: true + }, + }, + data() { + return { + height: document.documentElement.clientHeight - 94.5 + "px;", + loading: true, + url: this.src + }; + }, + mounted: function () { + setTimeout(() => { + this.loading = false; + }, 300); + const that = this; + window.onresize = function temp() { + that.height = document.documentElement.clientHeight - 94.5 + "px;"; + }; + } +}; +</script> -- Gitblit v1.9.3