Compare commits
No commits in common. "d731a42bfa3ebc5b666ad25e473ac690398ebe53" and "b92acbac4811bf1e634cbd3a09199f9cfe089f24" have entirely different histories.
d731a42bfa
...
b92acbac48
@ -1,56 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div class="h-100">
|
|
||||||
<map-box v-if="showMapbox" :key="mapboxKey" ref="mapbox" :enableNofly="true" />
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
import MapBox from '@/components/MapBox'
|
|
||||||
|
|
||||||
export default {
|
|
||||||
name: 'Nofly',
|
|
||||||
components: {
|
|
||||||
MapBox
|
|
||||||
},
|
|
||||||
data () {
|
|
||||||
return {
|
|
||||||
showMapbox: true, // 数据更新的时候 用于刷新地图组件
|
|
||||||
mapboxKey: 0 // 初始化一个变量用于控制map-box组件的重新渲染
|
|
||||||
}
|
|
||||||
},
|
|
||||||
computed: {
|
|
||||||
noflyData () {
|
|
||||||
return this.$store.state.noflyData
|
|
||||||
},
|
|
||||||
isCollapse () {
|
|
||||||
return this.$store.state.app.isCollapse
|
|
||||||
}
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
|
|
||||||
},
|
|
||||||
mounted () {
|
|
||||||
},
|
|
||||||
watch: {
|
|
||||||
noflyData: {
|
|
||||||
deep: true,
|
|
||||||
immediate: true,
|
|
||||||
handler () {
|
|
||||||
this.showMapbox = false
|
|
||||||
this.$nextTick(() => {
|
|
||||||
this.mapboxKey++
|
|
||||||
this.showMapbox = true
|
|
||||||
})
|
|
||||||
}
|
|
||||||
},
|
|
||||||
isCollapse (val) {
|
|
||||||
if (val) {
|
|
||||||
this.$refs.mapbox.handleResize()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style scoped></style>
|
|
||||||
Loading…
Reference in New Issue
Block a user