fix(培训课程):优化培训课程
This commit is contained in:
1 parent
e378e8b7fd
commit
aae041a0b4
19 files changed
+777
-188
No files matched your search
@@ -32,7 +32,9 @@
|
||||
</div>
|
||||
|
||||
<t-table :data="filteredCourses" :columns="courseColumns" row-key="id" size="small" :loading="loading">
|
||||
<template #name="{ row }"><span class="clamp-2">{{ row.name }}</span></template>
|
||||
<template #name="{ row }">
|
||||
<span class="course-name-link clamp-2" title="点击前往培训签到" @click="goSignTab(row)">{{ row.name }}</span>
|
||||
</template>
|
||||
<template #mode="{ row }">
|
||||
<t-tag :theme="row.mode === 'online' ? 'primary' : 'default'" variant="light" size="small" :class="{ 'course-tag-offline': row.mode !== 'online' }">
|
||||
{{ row.mode === 'online' ? '线上' : '线下' }}
|
||||
@@ -536,6 +538,11 @@ const goStudyStatus = (row: TrainingCourse, section: 'learning' | 'exam') => {
|
||||
router.push({ path: '/platform/training/study', query: { section, courseId: row.id } })
|
||||
}
|
||||
|
||||
// 课程名称点击 → 培训签到页,携带 courseId 自动选中该课程的场次
|
||||
const goSignTab = (row: TrainingCourse) => {
|
||||
router.push({ path: '/platform/training/sign', query: { courseId: row.id } })
|
||||
}
|
||||
|
||||
const loading = ref(false)
|
||||
const saving = ref(false)
|
||||
const courses = ref<TrainingCourse[]>([])
|
||||
@@ -1766,15 +1773,17 @@ watch(() => route.query.courseId, openDetailFromRoute)
|
||||
overflow-wrap: anywhere;
|
||||
}
|
||||
|
||||
// 列表单元格内容垂直居中:用行内级 -webkit-inline-box 承接两行截断,
|
||||
// 配合下方 .t-table__cell 的 vertical-align: middle,单行/双行内容均随行居中
|
||||
.clamp-2 {
|
||||
display: -webkit-box;
|
||||
display: -webkit-inline-box;
|
||||
-webkit-line-clamp: 2;
|
||||
line-clamp: 2;
|
||||
-webkit-box-orient: vertical;
|
||||
overflow: hidden;
|
||||
word-break: break-all;
|
||||
line-height: 1.5;
|
||||
min-height: 3em;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
// 学习/考试状态 tag 可点击跳转学习考试页
|
||||
@@ -1786,6 +1795,16 @@ watch(() => route.query.courseId, openDetailFromRoute)
|
||||
}
|
||||
}
|
||||
|
||||
// 课程名称可点击 → 培训签到页(与状态 tag 同款可点击观感,品牌色区分)
|
||||
.course-name-link {
|
||||
cursor: pointer;
|
||||
color: var(--td-brand-color);
|
||||
|
||||
&:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
}
|
||||
|
||||
.course-panel :deep(.t-table .t-table__cell) {
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user