<template>
  <ie-page bg-color="#F6F8FA" :fix-height="true">
    <ie-navbar :title="pageTitle" />
    <view class="h-20"></view>
    <view class="bg-white flex-1 min-h-1">
      <view class="pt-32 px-30 text-30 text-fore-title font-bold">{{ prevData.name }}的知识点记录</view>
      <knowledge-table :student-id="studentId" />
    </view>
  </ie-page>
</template>
<script lang="ts" setup>
import knowledgeTable from '@/pagesStudy/components/knowledge-table.vue';
import { useTransferPage } from '@/hooks/useTransferPage';
import { useScroll } from '@/hooks/useScroll';
const { prevData } = useTransferPage();
const studentId = ref(prevData.value.studentId);
const { scrollTop } = useScroll();

const pageTitle = computed(() => {
  if (scrollTop.value > 45) {
    return `学生知识点详情-${prevData.value.name}`;
  }
  return '学生知识点详情';
});
</script>
<style lang="scss" scoped></style>