<template>
  <div class="mod-home">
    <!--返回按钮-->
  <div class="backTo" v-show=true>
      <el-button @click="$router.back(-1)">返回</el-button>
  </div>
  <iframe src="http://localhost:8080/renren-fast/druid/sql.html" id="mobsf" frameborder="0" style="position:absolute;"></iframe>
  </div>
</template>
<script>
  export default {
    data () {
      return {
      }
    },
    mounted(){
      /**
       * iframe-宽高自适应显示
       */
      function changeMobsfIframe(){
        const mobsf = document.getElementById('mobsf');
        const deviceWidth = document.body.clientWidth;
        const deviceHeight = document.body.clientHeight;
        mobsf.style.width = (Number(deviceWidth)-120) + 'px'; //数字是页面布局宽度差值
        mobsf.style.height = (Number(deviceHeight)-160) + 'px'; //数字是页面布局高度差
      }
      changeMobsfIframe()
      window.onresize = function(){
        changeMobsfIframe()
      }
    },
    methods:{
    back(){
        this.$router.go(-1);//返回上一层
    },
    },
  }
</script>