import { defineComponent, reactive, ref, watch } from 'vue'
import styles from './rank-item.module.less'
import defaultIcon from '@/school/images/default-icon.jpg'
export default defineComponent({
  props: ['item', 'type', 'index'],
  name: 'rank-item',
  setup(props) {
    return () => (
      <>
        <div>
          <div class={styles.itemRankWrap}>
            <div class={styles.wrapLeft}>
              <div class={styles.headerWrap}>
                <img src={props.item.avatar ? props.item.avatar : defaultIcon} alt="" />
              </div>
              <div>
                <p class={styles.studentName}>{props.item.nickname}</p>
                <div class={styles.myTag}>{props.item.subjectNames}</div>
              </div>
            </div>
            <div class={styles.wrapRight}>
              <p>
                <span>我的排名</span>
                {props.item.ranking ? props.item.ranking : 0}
              </p>
            </div>
          </div>
          <div class={styles.wall}></div>
        </div>
      </>
    )
  }
})
