index.vue 706 B

1234567891011121314151617181920212223242526272829303132
  1. <template>
  2. <div :style="'height:' + height">
  3. <iframe
  4. scrolling="auto"
  5. frameborder="no"
  6. style="width: 100%; height: 100%"
  7. :src="url"/>
  8. </div>
  9. </template>
  10. <script>
  11. export default {
  12. name: "windy",
  13. components: {},
  14. data() {
  15. return {
  16. height: document.documentElement.clientHeight - 45.5 + "px;",
  17. url: "https://192.168.1.34:8000/"
  18. // url:process.env.VUE_APP_BASE_API + "/static/windy.html"
  19. };
  20. },
  21. mounted: function () {
  22. setTimeout(() => {
  23. this.loading = false;
  24. }, 300);
  25. const that = this;
  26. window.onresize = function temp() {
  27. that.height = document.documentElement.clientHeight - 45.5 + "px;";
  28. };
  29. }
  30. };
  31. </script>