Browse Source

导航栏修改

msx 1 year ago
parent
commit
347b79c3d5
3 changed files with 25 additions and 7 deletions
  1. 4 0
      main.js
  2. 8 0
      pages.json
  3. 13 7
      pages/index/index.vue

+ 4 - 0
main.js

@@ -31,6 +31,10 @@ Vue.component('test1',test1)
 import people from './pages/user/people.vue'
 Vue.component('people',people)
 
+import history from './pages/history/history.vue'
+Vue.component('history',history)
+import warndata from './pages/warndata/warndata.vue'
+Vue.component('warndata',warndata)
 // 自定义组件
 import mySelect from './components/my-componets/my-select.vue'
 Vue.component('mySelect',mySelect)

+ 8 - 0
pages.json

@@ -156,6 +156,14 @@
 		{
 			"path": "pages/test1/test1",
 			"style": {}
+		},
+		{
+			"path": "pages/history/history",
+			"style": {}
+		},
+		{
+			"path": "pages/warndata/warndata",
+			"style": {}
 		}
     ],
 	"globalStyle": {

+ 13 - 7
pages/index/index.vue

@@ -1,16 +1,18 @@
 <template>
 	<view>
-		<home :cur="PageCur" v-if="PageCur=='home'" :key="commponent1Key"></home>
-		<people v-if="PageCur=='people'" :key="commponent2Key"></people>
+		<home :cur="PageCur" v-if="PageCur=='home'" :key="commponent1Key"></home>>
+		<history :cur="PageCur" v-if="PageCur=='history'" :key="commponent2Key"></history>
+		<warndata :cur="PageCur" v-if="PageCur=='warndata'" :key="commponent3Key"></warndata>
+		<people v-if="PageCur=='people'" :key="commponent4Key"></people>
 		<view class="cu-bar tabbar bg-white shadow foot">
 			<view :class="PageCur=='home'?'action text-green':'action text-gray'" @click="NavChange" data-cur="home">
-				<view class='cuIcon-homefill'></view>数据管理
+				<view class='cuIcon-homefill'></view>设备监测
 			</view>
-			<view :class="PageCur=='test1'?'action text-green':'action text-gray'" @click="NavChange" data-cur="test1">
-				<view class='cuIcon-peoplelist'></view>数据管理1
+			<view :class="PageCur=='history'?'action text-green':'action text-gray'" @click="NavChange" data-cur="history">
+				<view class='cuIcon-peoplelist'></view>历史数据
 			</view>
-			<view :class="PageCur=='profile'?'action text-green':'action text-gray'" @click="NavChange" data-cur="profile">
-				<view class='cuIcon-profile'></view>数据管理2
+			<view :class="PageCur=='warndata'?'action text-green':'action text-gray'" @click="NavChange" data-cur="warndata">
+				<view class='cuIcon-profile'></view>预警分析
 			</view>
 			<view :class="PageCur=='people'?'action text-green':'action text-gray'" @click="NavChange" data-cur="people">
 				<view class='cuIcon-people'></view>个人信息
@@ -26,12 +28,16 @@
 				PageCur: 'home',
 				commponent1Key: 0,
 				commponent2Key: 0,
+				commponent3Key: 0,
+				commponent4Key: 0,
 			}
 		},
 		onLoad:function(){
 			this.PageCur='home'
 			++this.commponent1Key
 			++this.commponent2Key
+			++this.commponent3Key
+			++this.commponent4Key
 		},
 		methods: {
 			NavChange: function(e) {