<template>
	<view class="begin">
		<view class="title">
			学习心得
		</view>
		<uni-segmented-control :current="current" :values="value" style-type="text" @clickItem="onCheck"
			activeColor="red"></uni-segmented-control>
		<view class="content">
			<view v-show="current === 0">
				<part class="student_part" :part_title="part_title" :part_content="part_content"></part>
			</view>
			<view v-show="current === 1">
				选项卡2的内容
			</view>
		</view>
	</view>
</template>

<script>
	import part from "../../components/part.vue"
	export default {
		components:{
			part
		},
		data() {
			return {
				current: 0,
				value: ["学习感言", "学习历史"],
				part_title:"山西省委常委交流集中学习心得和体会，坚...",
				part_content:"8月18日，山西省委常委就集体学习《论群众路线》，《厉行节约、反对浪费》两本重要论述摘编，相互交流学习心..."
			}
		},
		methods: {
			onCheck(e) {
				if (this.current != e.currentIndex) {
					this.current = e.currentIndex
				}
			}
		}
	}
</script>

<style >
	.begin{
		background-color: rgb(244,244,244);
	}
	.title{
		font-size: 1.3rem;
		font-weight: bold;
		text-align: center;
	}

</style>