import { defineComponent, toRefs, reactive, onMounted, ref, watch } from 'vue' import classes from './index.module.less' import detaile from './images/detaile.png' import player from '@/components/albumItem/images/player.png' import icon from './images/icon.png' import { useRouter } from 'vue-router' export default defineComponent({ name: 'albumItem', emits: ['getDetail'], props: { detail: { type: Object, default: { auditStatus: '', endTime: '', lessonSubject: '', order: '', orderNo: '', page: 0, rows: 0, search: '', sort: '', startTime: '', userId: 0, videoLessonGroupId: 0 } }, isFull: { type: Boolean, default: false } }, setup(props, conent) { const state = reactive({ detail: props.detail, isFull: props.isFull }) watch( () => props.detail, detail => { state.detail = detail } ) const router = useRouter() const gotoVideoDetail = () => { if (state.isFull) { conent.emit('getDetail', state.detail.id) } router.push({ path: '/videoDetail', query: { id: state.detail.id } }) } return () => ( <>

{state.detail.countStudent}人在学

{state.detail.username}
{state.detail.lessonCount}课时
{state.detail.lessonSubjectName} {/*
*/}
了解更多
) } })