create.tsx 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. import ColUpload from "@/components/col-upload";
  2. import { Button, Grid, GridItem, Icon, Sticky } from "vant";
  3. import { defineComponent } from "vue";
  4. import styles from './create.module.less';
  5. import ClassInfo from "./class-info";
  6. import ClassContent from "./class-content";
  7. import nameActive from './images/icon_name_active.png'
  8. import education from './images/icon_education.png'
  9. import educationActive from './images/icon_education_active.png'
  10. import CreateSubmit from "./create-submit";
  11. export default defineComponent({
  12. name: 'Create',
  13. data() {
  14. return {
  15. active: 1,
  16. }
  17. },
  18. render() {
  19. return (
  20. <div class={styles['video-create']}>
  21. {this.active <= 2 ? <Grid style={{ paddingTop: '15px' }} direction="horizontal" columnNum="2">
  22. <GridItem v-slots={{
  23. default: () => (
  24. <>
  25. <Icon name={nameActive} size={38} />
  26. <span class={[styles.gridName, this.active >= 1 ? styles.active : null]}>课程信息</span>
  27. </>
  28. )
  29. }} />
  30. <GridItem v-slots={{
  31. default: () => (
  32. <>
  33. <Icon name={this.active === 2 ? educationActive : education} size={38} />
  34. <span class={[styles.gridName, this.active === 2 ? styles.active : null]}>课程内容</span>
  35. </>
  36. )
  37. }} />
  38. </Grid> : null}
  39. {/* 课程信息 */}
  40. {this.active === 1 ? <>
  41. <ClassInfo />
  42. </> : null}
  43. {/* 课程内容 */}
  44. {this.active === 2 ? <>
  45. <ClassContent />
  46. </> : null}
  47. {/* 预览 */}
  48. {this.active === 3 ? <>
  49. <CreateSubmit />
  50. </> : null}
  51. </div>
  52. )
  53. }
  54. })