Blame view

ant-design-vue-jeecg/src/components/layouts/IframeFReportView.vue 851 Bytes
肖超群 authored
1
2
<template>
肖超群 authored
3
4
  <iframe :id="id" :src="url" frameborder="0" width="100%" height="800px" scrolling="auto"
          style="background-color: #fff;"></iframe>
肖超群 authored
5
6
7
8

</template>

<script>
肖超群 authored
9
10
import PageLayout from '../page/PageLayout'
import RouteView from './RouteView'
肖超群 authored
11
肖超群 authored
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
export default {
  name: "IframePageContent",
  data() {
    return {
      url: "",
      id: ""
    }
  },
  created() {
    this.goUrl()
  },
  updated() {
    this.goUrl()
  },
  watch: {
    $route(to, from) {
      this.goUrl();
    }
  },
  methods: {
    goUrl() {
      let url = this.$route.meta.url
      let id = this.$route.path
      this.id = id
      //url = "http://www.baidu.com"
      console.log("------url------" + url)
      if (url !== null && url !== undefined) {
        this.url = url;
        //window.open(this.url);
肖超群 authored
41
42
43
      }
    }
  }
肖超群 authored
44
}
肖超群 authored
45
46
47
48
</script>

<style>
</style>