<template>
  <iframe :id="id" :src="url" frameborder="0" :width="width" :height="height" scrolling="auto" />
</template>

<script>

export default {
  name: 'IframePage',
  props: {
    url: {
      type: String,
      default: ''
    },
    id: {
      type: String,
      default: ''
    },
    width: {
      type: String,
      default: '100%'
    },
    height: {
      type: String,
      default: '700px'
    }
  },
  data() {
    return {
    }
  },
  watch: {
    $route(to, from) {
      this.goUrl()
    }
  },
  created() {
    this.goUrl()
  },
  updated() {
    this.goUrl()
  },
  methods: {
    goUrl() {
      console.log('------url------' + this.url)
    }
  }
}
</script>

<style>
</style>
