派生自 wuyushui/SewerAndRainNetwork

wangrui
2020-12-24 9cd476f875b661eca3eb5c4908ce0e744f48cbfe
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
<template>
  <div id="app" ref="app">
    <map-template></map-template>
  </div>
</template>
 
<script>
import MapTemplate from './views/MapTemplate.vue'
 
export default {
  name: 'App',
  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>
html,body,#app {
  font-family: Avenir, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  color: #2c3e50;
  padding: 0px;
  margin: 0px;
 
  text-align: left;
}
</style>