<template>
	<view class="com-teacher" v-if="info && info.id>0">
		<view class="header"> 
			<image :src="info.imgUrl" class="img"></image>
		</view>
		<view class="intro">
			<view class="name">{{info.name}}</view>
			<view class="time">{{info.openTime}}</view>
			<view class="tags">{{info.tips}}</view>
		</view>
		<view class="btns">
			<button class="btn active" @click="onStart">查看</button>
		</view>
		
	</view>
</template>

<script>
	export default {
		name:"TeacherItem",
		emits:['onStart'],
		props:{
			info:{
				type:Object,
				default:{
					id:0 
				}
			}
		},
		data() {
			return {
				
			};
		},
		methods:{
			onStart(e){
				this.$emit("onStart",this.info.id);
			},
		}
	}
</script>

<style lang="scss">
@import './CourseItem.scss';
</style>