From 8a1c08baaf0ee002b471996b195e7da180b90209 Mon Sep 17 00:00:00 2001 From: feige <791364011@qq.com> Date: 星期一, 21 七月 2025 09:38:47 +0800 Subject: [PATCH] 增加了前端代码库 --- src/components/iFrame/index.vue | 36 ++++++++++++++++++++++++++++++++++++ 1 files changed, 36 insertions(+), 0 deletions(-) diff --git a/src/components/iFrame/index.vue b/src/components/iFrame/index.vue new file mode 100644 index 0000000..f4334f3 --- /dev/null +++ b/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.1