From 3f519e47a8248ca240aba8e4459f047bb65bf5af Mon Sep 17 00:00:00 2001
From: wangrui <zephyrs0894@163.com>
Date: 星期三, 16 十二月 2020 16:09:17 +0800
Subject: [PATCH] 默认的两个组件都加载成功!

---
 src/App.vue |   17 ++++++++++++++---
 1 files changed, 14 insertions(+), 3 deletions(-)

diff --git a/src/App.vue b/src/App.vue
index 3061c15..010714e 100644
--- a/src/App.vue
+++ b/src/App.vue
@@ -1,19 +1,28 @@
 <template>
-  <div id="app">
+  <div id="app" ref="app">
     <map-template></map-template>
   </div>
 </template>
 
 <script>
 import MapTemplate from './views/MapTemplate.vue'
+
 export default {
   name: 'App',
-  components: {MapTemplate}
+  components: {MapTemplate},
+  mounted(){
+    this.$nextTick(()=>{
+      let h = window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight; //娴忚鍣ㄩ珮搴�
+      let topH = this.$refs.app.offsetHeight;
+      console.log(h)
+      this.height = (h - topH) + "px"
+    })
+  }
 }
 </script>
 
 <style>
-#app {
+html,body,#app {
   font-family: Avenir, Helvetica, Arial, sans-serif;
   -webkit-font-smoothing: antialiased;
   -moz-osx-font-smoothing: grayscale;
@@ -21,5 +30,7 @@
   color: #2c3e50;
   padding: 0px;
   margin: 0px;
+
+  text-align: left;
 }
 </style>

--
Gitblit v1.8.0