import { Cell, Icon, Image, Rate } from 'vant' import { defineComponent } from 'vue' import styles from './practice-item.module.less' import iconEdu from './images/icon_edu.png' import iconMusicMan from './images/icon_music_man.png' import iconNew from './images/icon_new.png' import iconTeacher from '@/common/images/icon_teacher.png' export default defineComponent({ name: 'practiceItem', props: { item: { type: Object, default: {} }, onClick: { type: Function, default: (item: any) => {} } }, computed: { subjectNameList() { const { configSubject } = this.item return configSubject ? configSubject.split(',') : [] }, starGrade() { const { starGrade } = this.item return Number(starGrade) || 0 } }, render() { return ( { this.onClick(this.item) }} v-slots={{ icon: () => (
{/* */} {/* */}
), title: () => (

{this.item.userName || `游客${this.item.teacherId || ''}`} {/* {this.subjectNameList.map( (item: string, index: number) => index <= 1 && {item} )} */}

{this.starGrade ? ( ) : ( 暂无评分 )}
{this.item.schoolSubject && (

{this.item.schoolSubject}

)}

已上课程 {this.item.expTime} {this.item.subjectPrice > 0 && ( <> ¥{this.item.subjectPrice}/ )} {this.item.courseMinutes} 分钟

) }} /> ) } })