zxl
15 小时以前 172933f098017bc4c4f57dcda0d490ea12bb13bb
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
<template>
  <div class="iframediv">
    <iframe :src="link" ref="ifram" scrolling="auto" id="ifram"></iframe>
  </div>
</template>
 
<script>
export default {
  name: "ExternalLink",
  data() {
    return {
      link: this.$router.currentRoute.name,
    };
  },
  mounted() {
    let iframe = document.getElementById("ifram");
    const deviceWidth = document.body.clientWidth;
    const deviceHeight = document.body.clientHeight;
    iframe.style.width = deviceWidth + "px";
    iframe.style.height = deviceHeight + "px";
  }
};
</script>
<style lang="scss" scoped>
 
</style>