提交 9514b044 authored 作者: lidongxu's avatar lidongxu

style(jimureport): 积木报表广告上移

同上
上级 219ccbaf
......@@ -4,7 +4,8 @@
:src="url"
frameborder="no"
style="width: 100%; height: 100%"
scrolling="auto" />
scrolling="auto"
@load="loadCompleted" />
</div>
</template>
......@@ -15,6 +16,7 @@ const props = defineProps({
required: true
}
})
const emits = defineEmits(['load'])
const height = ref(document.documentElement.clientHeight - 94.5 + "px;")
const loading = ref(true)
......@@ -28,4 +30,8 @@ onMounted(() => {
height.value = document.documentElement.clientHeight - 94.5 + "px;";
};
})
const loadCompleted = () => {
emits('load')
}
</script>
<template>
<i-frame :src="openUrl"
id="jimuReportFrame" ></i-frame>
id="jimuReportFrame"
ref="myIframe"
@load="load"></i-frame>
</template>
<script>
// 报表设计器
......@@ -17,17 +19,28 @@ export default {
},
mounted: function () {
},
methods: {
load() {
setTimeout(() => {
const iframe = this.$refs.myIframe;
console.log(iframe.contentDocument)
const iframeBody = iframe.body;
console.log(iframeBody)
}, 5000)
// 现在你可以操作 iframeBody 中的标签了
// const h1Element = iframeBody.querySelector('h1');
// console.log(h1Element.textContent); // 输出 h1 标签的文本内容
}
}
};
</script>
<style lang="scss">
#jimuReportFrame{
#jimuReportFrame {
width: 100%;
height: 100%;
::v-deep(.layout){
background-color: transparent !important;
}
margin-top: -50px;
}
</style>
\ No newline at end of file
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论