suerprisePlus
2024-09-24 0d50fe17a7086791275bc21d70adc79c5497c9d2
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
<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>