import { defineComponent, PropType } from 'vue' import styles from './index.module.less' import { Cell, Icon, Image } from 'vant' import videoStop from '@common/images/icon_video_stop.png' import bars from '@common/svg/bars.svg' /** * @description: 课程视频列表项 * @param {title} 视频标题 * @param {imgUrl} 视频封面图 * @param {content} 视频内容 */ interface IDetail { id?: number title: string content?: string imgUrl?: string videoUrl?: string index?: number } export default defineComponent({ name: 'CourseVideoItem', props: { detail: { type: Object as PropType, required: true }, border: { type: Boolean, default: false }, onPlay: { type: Function as PropType<(detail: IDetail) => void>, default: () => {} }, playId: { // 播放视屏编号 type: Number, default: 0 } }, render() { return ( this.onPlay(this.detail)} v-slots={{ icon: () => (
{this.detail.id === this.playId ? (
播放中
) : ( )}
), title: () => (

{this.detail.title}

{this.detail.content}

) }} >
) } })