Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Hooke
/
mlaj
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
hookehuyr
2025-06-09 16:03:16 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
6c41f3c5fa5c837e7a0f515618e47db7e772f373
6c41f3c5
1 parent
cb6c465c
feat(StudyDetailPage): 高亮显示当前课程标题
添加计算属性 courseId 并根据当前课程 ID 高亮显示标题文本
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
4 deletions
src/views/study/StudyDetailPage.vue
src/views/study/StudyDetailPage.vue
View file @
6c41f3c
...
...
@@ -221,7 +221,7 @@
<div v-if="lesson.progress > 0 && lesson.progress < 100"
class="absolute top-2 right-2 px-2 py-1 bg-green-100 text-green-600 text-xs rounded">
上次看到</div>
<div class="text-black text-base font-medium mb-2">{{ lesson.title }}</div>
<div class="text-black text-base font-medium mb-2"
:class="{ 'text-green-600' : courseId == lesson.id }"
>{{ lesson.title }}</div>
<div class="flex items-center text-sm text-gray-500">
<span>{{ course_type_maps[lesson.course_type] }}</span>
<span v-if="course_type_maps[lesson.course_type]" class="mx-2">|</span>
...
...
@@ -402,6 +402,10 @@ const showPdf = ({ title, url }) => {
pdfShow.value = true;
};
const courseId = computed(() => {
return route.params.id || '';
});
onMounted(async () => {
// 延迟设置topWrapper和bottomWrapper的高度
setTimeout(() => {
...
...
@@ -420,9 +424,10 @@ onMounted(async () => {
})
}, 500);
const courseId = route.params.id;
if (courseId) {
const { code, data } = await getScheduleCourseAPI({ i: courseId });
if (courseId.value) {
const { code, data } = await getScheduleCourseAPI({ i: courseId.value });
if (code) {
course.value = data;
courseFile.value = data.file;
...
...
Please
register
or
login
to post a comment