<template>
|
<div class="hrefBox">
|
<el-card id="elcard" class="elcard">
|
<iframe height="100%" width="100%" id="bdIframe" frameborder="0" scrolling="auto"
|
:src="store.$state.setHrefUrl"></iframe>
|
</el-card>
|
</div>
|
</template>
|
|
<script setup lang="ts">
|
import { ref, onMounted, watch, nextTick } from 'vue';
|
import useStore from '../../store/defineStore.ts';
|
const store = useStore();
|
onMounted(()=>{
|
const oIframe = document.getElementById('bdIframe');
|
const deviceWidth = document.getElementById('elcard').clientWidth;
|
const deviceHeight = document.getElementById('elcard').clientHeight;
|
|
oIframe.style.height = (deviceHeight) + 'px'; //数字是页面布局高度差
|
|
})
|
</script>
|
|
<style lang="scss" scoped>
|
.hrefBox {
|
width: 79%;
|
height: 100%;
|
padding-left: 1%;
|
|
.elcard {
|
width: 100%;
|
height: 100%;
|
}
|
|
::v-deep .el-card {
|
padding: 0px !important;
|
}
|
|
::v-deep .el-card__body {
|
padding: 0px !important;
|
}
|
|
}</style>
|