|
@@ -1,7 +1,10 @@
|
|
|
import ColHeader from '@/components/col-header'
|
|
|
import { defineComponent } from 'vue'
|
|
|
import styles from './teacher-home.module.less'
|
|
|
-import { Cell, CellGroup, Grid, GridItem, Icon, Image, Sticky } from 'vant'
|
|
|
+import { Button, Cell, Icon, Image, Rate, Sticky, Tab, Tabs } from 'vant'
|
|
|
+
|
|
|
+import iconTeacher from '@common/images/icon_teacher.png'
|
|
|
+import Single from './components/single'
|
|
|
|
|
|
export const getAssetsHomeFile = (fileName: string) => {
|
|
|
const path = `./images/${fileName}`
|
|
@@ -11,6 +14,11 @@ export const getAssetsHomeFile = (fileName: string) => {
|
|
|
|
|
|
export default defineComponent({
|
|
|
name: 'teacherHome',
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ tabs: 'single'
|
|
|
+ }
|
|
|
+ },
|
|
|
render() {
|
|
|
return (
|
|
|
<div class={styles['teacher-record']}>
|
|
@@ -25,24 +33,78 @@ export default defineComponent({
|
|
|
default: () => (
|
|
|
<div class={styles.headerContent}>
|
|
|
<div class={styles.headerCount}>
|
|
|
- <div class={styles.headerItem}>
|
|
|
- <span class={styles.num}>142</span>
|
|
|
- <span>累计训练天数</span>
|
|
|
- </div>
|
|
|
- <div class={styles.headerItem}>
|
|
|
- <span class={styles.num}>95</span>
|
|
|
- <span>累计训练时长</span>
|
|
|
- </div>
|
|
|
- <div class={styles.headerItem}>
|
|
|
- <span class={styles.num}>142</span>
|
|
|
- <span>累计训练次数</span>
|
|
|
+ <Cell
|
|
|
+ class={styles['open-teacher-info']}
|
|
|
+ border={false}
|
|
|
+ v-slots={{
|
|
|
+ icon: () => (
|
|
|
+ <Image
|
|
|
+ class={styles.userLogo}
|
|
|
+ src={iconTeacher}
|
|
|
+ fit="cover"
|
|
|
+ />
|
|
|
+ )
|
|
|
+ }}
|
|
|
+ >
|
|
|
+ <div class={styles['teacher-info']}>
|
|
|
+ <div class={styles['teacher-name']}>李老师</div>
|
|
|
+ <p class={styles.piNameSubject}>
|
|
|
+ <span class={styles.subject}>圆号</span>
|
|
|
+ <span class={styles.subject}>大号</span>
|
|
|
+ </p>
|
|
|
+ </div>
|
|
|
+ <div class={styles['teacher-desc']}>
|
|
|
+ <Button
|
|
|
+ type="primary"
|
|
|
+ size="mini"
|
|
|
+ style={{ borderRadius: '5px', padding: '5px 10px' }}
|
|
|
+ >
|
|
|
+ <Icon name="plus" />
|
|
|
+ 关注
|
|
|
+ </Button>
|
|
|
+ </div>
|
|
|
+ </Cell>
|
|
|
+ <div class={styles['teacher-bottom']}>
|
|
|
+ <div class={styles.level}>
|
|
|
+ <Rate
|
|
|
+ iconPrefix="iconfont"
|
|
|
+ color="#FFC459"
|
|
|
+ void-icon="star_default"
|
|
|
+ icon="star_active"
|
|
|
+ size={15}
|
|
|
+ />
|
|
|
+ </div>
|
|
|
+ <div class={styles['teacher-data']}>
|
|
|
+ <div class={styles['teacher-data_item']}>
|
|
|
+ 粉丝 <span>134</span>
|
|
|
+ </div>
|
|
|
+ <div class={styles['teacher-data_item']}>
|
|
|
+ 已上课时 <span>134</span>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
)
|
|
|
}}
|
|
|
/>
|
|
|
+ <Tabs
|
|
|
+ color="var(--van-primary)"
|
|
|
+ background="#f8f9fc"
|
|
|
+ lineWidth={20}
|
|
|
+ v-model:active={this.tabs}
|
|
|
+ >
|
|
|
+ <Tab title="个人风采" name="single"></Tab>
|
|
|
+ <Tab title="陪练课" name="practice"></Tab>
|
|
|
+ <Tab title="直播课" name="live"></Tab>
|
|
|
+ <Tab title="视频课" name="video"></Tab>
|
|
|
+ <Tab title="乐谱" name="music"></Tab>
|
|
|
+ </Tabs>
|
|
|
</Sticky>
|
|
|
+
|
|
|
+ <div class={styles.container}>
|
|
|
+ {this.tabs === 'single' && <Single />}
|
|
|
+ </div>
|
|
|
</div>
|
|
|
)
|
|
|
}
|