浏览代码

tabbar地图改为设备中心默认地图

xiaohaizhao 1 年之前
父节点
当前提交
a02862c05f
共有 1 个文件被更改,包括 9 次插入3 次删除
  1. 9 3
      pages/index/index.vue

+ 9 - 3
pages/index/index.vue

@@ -2,7 +2,7 @@
 	<view class="container">
 		<tab-control ref="tabControl" :active='opentabControl' />
 		<home ref="Home" v-show="PageCur == 'Home'" />
-		<my-map ref="Map" v-show="PageCur == 'Map'" />
+		<facility ref="Map" :tabHeight="tabHeight" v-show="PageCur == 'Map'" />
 		<message ref="Message" v-show="PageCur == 'Message'" />
 		<mine ref="Mine" v-show="PageCur == 'Mine'" />
 		<view class="cu-bar tabbar bg-white foot" style="z-index: 100000;">
@@ -32,17 +32,23 @@
 
 <script>
 import home from "./modules/home.vue";
-import myMap from "./modules/my-map.vue";
+import facility from "../facility/index.vue";
 import message from "./modules/message.vue";
 import mine from "./modules/mine.vue";
 import tabControl from "../../components/bottomTabControl.vue";
 export default {
-	components: { home, myMap, message, mine, tabControl },
+	components: { home, facility, message, mine, tabControl },
 	data() {
 		return {
 			PageCur: "Home",
+			tabHeight: 98
 		}
 	},
+	mounted() {
+		this.getHeight('.cu-bar', this, false).then(res => {
+			this.tabHeight = res.height
+		})
+	},
 	methods: {
 		opentabControl(active) {
 			if (this.$refs.tabControl.active !== active) this.$nextTick(() => this.$refs.tabControl.active = active);