<template>
  <ie-page bg-color="#F6F8FA">
    <ie-navbar :title="pageTitle" />
    <view class="h-20"></view>
    <view class="bg-white">
      <view class="pt-35 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>