hookehuyr

refactor(StudyPage): 调整布局并移除未使用的VanCell组件

- 将学习记录标签的顶部布局调整为固定定位,并添加背景色和边框
- 移除未使用的VanCell组件以简化代码
- 添加新的课程数据以丰富学习记录内容
......@@ -28,7 +28,6 @@ declare module 'vue' {
TermsPopup: typeof import('./components/ui/TermsPopup.vue')['default']
UploadVideoPopup: typeof import('./components/ui/UploadVideoPopup.vue')['default']
VanButton: typeof import('vant/es')['Button']
VanCell: typeof import('vant/es')['Cell']
VanCellGroup: typeof import('vant/es')['CellGroup']
VanCheckbox: typeof import('vant/es')['Checkbox']
VanDatePicker: typeof import('vant/es')['DatePicker']
......
......@@ -29,8 +29,8 @@
<van-tabs v-model:active="activeTab" sticky shrink>
<!-- 学习记录标签 -->
<van-tab title="学习记录" name="record">
<div class="p-4">
<div class="flex space-x-4 mb-4">
<div class=" bg-white z-10 px-4 py-3 border-b border-gray-100" style="position: sticky; top: 44px;">
<div class="flex space-x-4">
<button class="rounded-full px-4 py-1 text-xs transition-colors"
:class="courseType === 'column' ? 'bg-green-500 text-white' : 'bg-gray-100 text-gray-600'"
@click="courseType = 'column'">
......@@ -42,6 +42,8 @@
单课
</button>
</div>
</div>
<div class="p-4">
<course-list v-if="courseType === 'column'" :courses="columnCourses" />
<course-list v-else :courses="singleCourses" />
</div>
......@@ -133,6 +135,42 @@ const columnCourses = ref([
duration: 3600, // 1小时
studyTime: 10,
},
{
id: 1,
title: "考前赋能冥想",
type: "video",
thumbnail: "https://cdn.ipadbiz.cn/mlaj/images/zMRLZh40kms.jpg",
progress: 100,
duration: 1200, // 20分钟
studyTime: 1200,
},
{
id: 2,
title: "开学礼·让的智慧·心法老师·20241001(上)",
type: "audio",
thumbnail: "https://cdn.ipadbiz.cn/mlaj/images/zMRLZh40kms.jpg",
progress: 1,
duration: 3600, // 1小时
studyTime: 10,
},
{
id: 1,
title: "考前赋能冥想",
type: "video",
thumbnail: "https://cdn.ipadbiz.cn/mlaj/images/zMRLZh40kms.jpg",
progress: 100,
duration: 1200, // 20分钟
studyTime: 1200,
},
{
id: 2,
title: "开学礼·让的智慧·心法老师·20241001(上)",
type: "video",
thumbnail: "https://cdn.ipadbiz.cn/mlaj/images/zMRLZh40kms.jpg",
progress: 1,
duration: 3600, // 1小时
studyTime: 10,
},
]);
const singleCourses = ref([
......