index.vue 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. <<<<<<< HEAD
  2. <template>
  3. <div v-loading="loading" :style="'height:' + height">
  4. <iframe
  5. :src="src"
  6. frameborder="no"
  7. style="width: 100%; height: 100%"
  8. scrolling="auto"
  9. />
  10. </div>
  11. </template>
  12. <script>
  13. export default {
  14. props: {
  15. src: {
  16. type: String,
  17. required: true
  18. },
  19. },
  20. data() {
  21. return {
  22. height: document.documentElement.clientHeight - 94.5 + "px;",
  23. loading: true,
  24. url: this.src
  25. };
  26. },
  27. mounted: function () {
  28. setTimeout(() => {
  29. this.loading = false;
  30. }, 300);
  31. const that = this;
  32. window.onresize = function temp() {
  33. that.height = document.documentElement.clientHeight - 94.5 + "px;";
  34. };
  35. }
  36. };
  37. </script>
  38. =======
  39. <template>
  40. <div v-loading="loading" :style="'height:' + height">
  41. <iframe
  42. :src="src"
  43. frameborder="no"
  44. style="width: 100%; height: 100%"
  45. scrolling="auto"
  46. />
  47. </div>
  48. </template>
  49. <script>
  50. export default {
  51. props: {
  52. src: {
  53. type: String,
  54. required: true
  55. },
  56. },
  57. data() {
  58. return {
  59. height: document.documentElement.clientHeight - 94.5 + "px;",
  60. loading: true,
  61. url: this.src
  62. };
  63. },
  64. mounted: function () {
  65. setTimeout(() => {
  66. this.loading = false;
  67. }, 300);
  68. const that = this;
  69. window.onresize = function temp() {
  70. that.height = document.documentElement.clientHeight - 94.5 + "px;";
  71. };
  72. }
  73. };
  74. </script>
  75. >>>>>>> ec6eeb00ce64eb587a455406167d302dc3e59216