Explorar el Código

windy地图调整

yl hace 8 meses
padre
commit
3d00380be5
Se han modificado 1 ficheros con 19 adiciones y 6 borrados
  1. 19 6
      cpp-ui/src/views/windy/index.vue

+ 19 - 6
cpp-ui/src/views/windy/index.vue

@@ -1,19 +1,32 @@
 <template>
-  <i-frame :src="url" />
+  <div :style="'height:' + height">
+    <iframe
+      scrolling="auto"
+      frameborder="no"
+      style="width: 100%; height: 100%"
+      :src="url" />
+  </div>
+
 </template>
 <script>
-import iFrame from "../../components/iFrame/index";
 export default {
   name: "windy",
-  components: { iFrame },
+  components: {},
   data() {
     return {
+      height: document.documentElement.clientHeight - 79.5 + "px;",
       url: "http://192.168.1.34:8000/"
       // url:process.env.VUE_APP_BASE_API + "/static/windy.html"
     };
   },
-  mounted() {
-
-  },
+  mounted: function () {
+    setTimeout(() => {
+      this.loading = false;
+    }, 300);
+    const that = this;
+    window.onresize = function temp() {
+      that.height = document.documentElement.clientHeight - 79.5  + "px;";
+    };
+  }
 };
 </script>