<template>
	<view class="content">
		<!-- tabbar -->
		<view class="tabbar">
			<view @click="active=1" :class="[active==1?'active':'']">报告</view>
			<view @click="active=2" :class="[active==2?'active':'']">曲线</view>
			<!-- <view @click="active=3" :class="[active==3?'active':'']">记录</view> -->
		</view>
		<!--报告  -->
		<view v-if="active==1">
			<report></report>
		</view>
		<!-- 曲线 -->
		<view v-if="active==2">
			<charts></charts>
		</view>
		<!-- 记录 -->
		<view v-if="active==3">
			<contrast></contrast>
		</view>
	</view>
</template>

<script>
	import report from "./components/report.vue"
	import charts from "./components/charts.vue"
	export default {
		data() {
			return {
				active: 1
			}
		},
		components: {
			report,
			charts
		},
		methods: {

		}
	}
</script>

<style scoped lang="scss">
	.content {
		padding: 15px;
		font-size: 14px;
		background-color: #F5F6FA;
		min-height: 100vh;
	}

	.tabbar {
		width: 100%;
		padding: 15px;
		display: flex;
		align-items: center;
		justify-content: space-around;

		view {
			position: relative;
		}

		.active:after {
			content: "";
			height: 3px;
			width: 100%;
			position: absolute;
			bottom: -5px;
			left: 0;
			border-radius: 5px;
			background: $maincolor;
		}
	}

</style>