Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
69d00d7650
@ -106,7 +106,9 @@
|
||||
:style="getLessonTagStyle(type.lessonType)"
|
||||
@click="selectLessonType(type.lessonType)"
|
||||
>
|
||||
<div class="type-icon">{{ getLessonTypeIcon(type.lessonType) }}</div>
|
||||
<div class="type-icon">
|
||||
<component :is="getLessonTypeIconComponent(type.lessonType)" />
|
||||
</div>
|
||||
<div class="type-name">{{ getLessonTypeName(type.lessonType) }}</div>
|
||||
<div class="type-count">{{ type.count }} 节课</div>
|
||||
</div>
|
||||
@ -236,7 +238,16 @@
|
||||
import { ref, reactive, computed, watch } from 'vue';
|
||||
import { message } from 'ant-design-vue';
|
||||
import dayjs, { Dayjs } from 'dayjs';
|
||||
import { CalendarOutlined } from '@ant-design/icons-vue';
|
||||
import {
|
||||
CalendarOutlined,
|
||||
BookOutlined,
|
||||
TeamOutlined,
|
||||
HeartOutlined,
|
||||
SoundOutlined,
|
||||
UsergroupAddOutlined,
|
||||
ExperimentOutlined,
|
||||
BgColorsOutlined,
|
||||
} from '@ant-design/icons-vue';
|
||||
import {
|
||||
getCourseCollections,
|
||||
getCourseCollectionPackages,
|
||||
@ -537,19 +548,27 @@ const filterTeacher = (input: string, option: any) => {
|
||||
return teacher?.name?.toLowerCase().includes(input.toLowerCase()) || false;
|
||||
};
|
||||
|
||||
// 获取课程类型图标(与课程列表 tag 类型对齐)
|
||||
const getLessonTypeIcon = (type: string): string => {
|
||||
const icons: Record<string, string> = {
|
||||
INTRODUCTION: '📖', INTRO: '📖',
|
||||
COLLECTIVE: '👥',
|
||||
LANGUAGE: '💬', DOMAIN_LANGUAGE: '💬',
|
||||
SOCIETY: '🤝', SOCIAL: '🤝', DOMAIN_SOCIAL: '🤝',
|
||||
SCIENCE: '🔬', DOMAIN_SCIENCE: '🔬',
|
||||
ART: '🎨', DOMAIN_ART: '🎨',
|
||||
HEALTH: '❤️', DOMAIN_HEALTH: '❤️',
|
||||
};
|
||||
return icons[type] || '📚';
|
||||
// 课程类型与 @ant-design/icons-vue 图标映射
|
||||
const lessonTypeIconMap: Record<string, any> = {
|
||||
INTRODUCTION: BookOutlined,
|
||||
INTRO: BookOutlined,
|
||||
COLLECTIVE: TeamOutlined,
|
||||
LANGUAGE: SoundOutlined,
|
||||
DOMAIN_LANGUAGE: SoundOutlined,
|
||||
SOCIETY: UsergroupAddOutlined,
|
||||
SOCIAL: UsergroupAddOutlined,
|
||||
DOMAIN_SOCIAL: UsergroupAddOutlined,
|
||||
SCIENCE: ExperimentOutlined,
|
||||
DOMAIN_SCIENCE: ExperimentOutlined,
|
||||
ART: BgColorsOutlined,
|
||||
DOMAIN_ART: BgColorsOutlined,
|
||||
HEALTH: HeartOutlined,
|
||||
DOMAIN_HEALTH: HeartOutlined,
|
||||
MUSIC: SoundOutlined,
|
||||
SPORT: HeartOutlined,
|
||||
OUTDOOR: TeamOutlined,
|
||||
};
|
||||
const getLessonTypeIconComponent = (type: string) => lessonTypeIconMap[type] || BookOutlined;
|
||||
|
||||
// 获取选中的课程类型名称(与课程列表 tag 一致)
|
||||
const getSelectedLessonTypeName = (): string => {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user