<style lang='scss' scoped></style>
<template>
	<view class="">
		<view class="u-page">
			<!-- 所有内容的容器 -->
			<block v-if="current==0">
				<home></home>
			</block>
			<block v-else-if="current==1">
				<wisdomElectricity></wisdomElectricity>
			</block>
			<block v-else-if="current==2">
				<alarm></alarm>
			</block>
			<block v-else-if="current==3">
				<myCenter></myCenter>
			</block>
		</view>
		<!-- 与包裹页面所有内容的元素u-page同级，且在它的下方 -->
		<!-- #ifdef APP-PLUS -->
		<u-tabbar v-model="current" :list="list" active-color="#1c9aff"></u-tabbar>
		<!-- #endif -->
		<!-- #ifndef APP-PLUS -->
		<u-tabbar v-model="current" :list="list" active-color="#1c9aff"></u-tabbar>
		<!-- #endif -->
		<!-- #ifndef APP-PLUS -->
		<u-tabbar v-model="current" :list="list" active-color="#1c9aff"></u-tabbar>
		<!-- #endif -->
		<!-- #ifndef APP-PLUS -->
		<u-tabbar v-model="current" :list="list" active-color="#1c9aff"></u-tabbar>
		<!-- #endif -->
	</view>
</template>
<script>
	import myCenter from "./myCenter.vue";
	import home from "./home.vue";
	import alarm from "./alarm.vue";
	import wisdomElectricity from "./wisdomElectricity.vue"
	export default {
		data() {
			return {
				list: [{
						iconPath: "/static/images/toolbar/home.png",
						selectedIconPath: "/static/images/toolbar/act-home.png",
						text: '首页',
						customIcon: false,
					},
					{
						iconPath: "/static/images/toolbar/project.png",
						selectedIconPath: "/static/images/toolbar/act-project.png",
						text: '设备',
						customIcon: false,
					},
					{
						iconPath: "/static/images/toolbar/alarm.png",
						selectedIconPath: "/static/images/toolbar/act-alarm.png",
						text: '报警',
						customIcon: false,
					},
					{
						iconPath: "/static/images/toolbar/my.png",
						selectedIconPath: "/static/images/toolbar/act-my.png",
						text: '我的',
						customIcon: false,
					},
				],
				current: 0
			}
		},
		components:{
			myCenter,
			home,
			alarm,
			wisdomElectricity
		},
		watch: {},
		onLoad() {},
		methods: {}
	}
</script>
