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