<template>
	<view class="semester">
		<view @click="itemClick(item,index)" v-for="(item,index) in list" :key="index" class="semester-item">
			<view class="semester-item-color">

			</view>
			<view class="semester-item-text">
				<view class="semester-item-text-top">
					{{item.title}}
				</view>
				<view class="semester-item-text-bottom">
					{{item.date}}
				</view>
			</view>
			<uni-icons type="forward" color="#999" size="20"></uni-icons>
		</view>
	</view>
</template>

<script>
	export default {
		name: "semesterList",
		props: {
			list: {
				type: Array,
				default: () => []
			}
		},
		data() {
			return {

			};
		},
		methods: {
			itemClick(item) {
				this.$emit('click', item)
			}
		}
	}
</script>

<style lang="scss" scoped>
	.semester {
		width: 100%;

		box-sizing: border-box;

		.semester-item {
			background-color: #fff;
			border-radius: 5.33px;
			box-shadow: 0px 0px 6.67px 0px rgba(147, 147, 147, 0.20);
			width: 100%;
			height: 148rpx;
			margin-bottom: 32rpx;
			display: flex;
			align-items: center;
			box-sizing: border-box;
			padding: 32rpx;

			.semester-item-color {
				width: 16rpx;
				height: 16rpx;
				background-color: #05cca1;
				border-radius: 50%;
				margin-right: 32rpx;
			}

			.semester-item-text {
				flex: 1;

				.semester-item-text-bottom {
					color: #999;
				}
			}
		}
	}
</style>