6756b7a0f79eb4d2aabc68909df18955292ac894.svn-base 915 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. <template>
  2. <iframe :id="id" :src="url" frameborder="0" width="100%" height="800px" scrolling="auto" style="background-color: #fff;"></iframe>
  3. </template>
  4. <script>
  5. import PageLayout from '../page/PageLayout'
  6. import RouteView from './RouteView'
  7. export default {
  8. name: "IframePageContent",
  9. data () {
  10. return {
  11. url: "",
  12. id:""
  13. }
  14. },
  15. created () {
  16. this.goUrl()
  17. },
  18. updated () {
  19. this.goUrl()
  20. },
  21. watch: {
  22. $route(to, from) {
  23. this.goUrl();
  24. }
  25. },
  26. methods: {
  27. goUrl () {
  28. let url = this.$route.meta.url
  29. let id = this.$route.path
  30. this.id = id
  31. //url = "http://www.baidu.com"
  32. console.log("------url------"+url)
  33. if (url !== null && url !== undefined) {
  34. this.url = url;
  35. //window.open(this.url);
  36. }
  37. }
  38. }
  39. }
  40. </script>
  41. <style>
  42. </style>