美文网首页
关于iframe内嵌网页宽高

关于iframe内嵌网页宽高

作者: 最慢的是活着 | 来源:发表于2018-03-15 12:49 被阅读89次
<template>
  <div class="wendan">
  <iframe :src = "this.wendan" :style="{'width':`${iWidth}px`,'height':`${iHeight}px`}" ></iframe>
  </div>
</template>
<script>

export default {
  name: 'wendan',
  props: ['wendan'],
  data(){
    return {
      iWidth:0,
      iHeight:0
    }
  },
  created(){
    this.iWidth =document.documentElement.clientWidth;

    this.iHeight=document.documentElement.clientHeight;
  },
  methods:{
    getHeight(){

    }
  }

}

</script>
<style lang="less" scoped>

</style>


相关文章

网友评论

      本文标题:关于iframe内嵌网页宽高

      本文链接:https://www.haomeiwen.com/subject/jzfhqftx.html