study-history.vue 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. <template>
  2. <ie-page bg-color="#F6F8FA" :fix-height="true">
  3. <ie-navbar title="学习记录" />
  4. <view class="bg-white sticky z-1" :style="{ top: baseStickyTop + 'px' }">
  5. <uv-tabs :list="list" :current="current" :activeStyle="activeStyle" :inactiveStyle="inactiveStyle"
  6. :scrollable="false" @change="handleTabChange"></uv-tabs>
  7. </view>
  8. <view class="h-20"></view>
  9. <knowledge-history v-if="current === 0" />
  10. <exam-history v-if="current === 1" />
  11. <practice-history v-if="current === 2" />
  12. <video-history v-if="current === 3" />
  13. </ie-page>
  14. </template>
  15. <script lang="ts" setup>
  16. import { useNavbar } from '@/hooks/useNavbar';
  17. import knowledgeHistory from './components/knowledge-history.vue'
  18. import examHistory from './components/exam-history.vue'
  19. import practiceHistory from './components/practice-history.vue'
  20. import videoHistory from './components/video-history.vue'
  21. const { baseStickyTop } = useNavbar();
  22. const current = ref(0);
  23. const list = [
  24. { name: '知识点记录', },
  25. { name: '试卷记录', },
  26. { name: '刷题总量', },
  27. { name: '视频总数', }
  28. ]
  29. const activeStyle = {
  30. fontWeight: 'bold',
  31. color: '#31A0FC'
  32. }
  33. const inactiveStyle = {
  34. color: '#999999'
  35. }
  36. const handleTabChange = (e: any) => {
  37. current.value = e.index;
  38. }
  39. </script>
  40. <style lang="scss" scoped></style>