mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-20 08:16:46 +08:00
feat(course): 添加外部链接组件及预览模式支持
- 新增 LinkComp 组件用于处理外部链接资源 - 在 createCourse.vue 中注册并使用 LinkComp 组件 - 实现添加外部链接功能,设置 resType 为 52 - EditorComp 和 LinkComp 支持 isPreview 禁用编辑状态 - useCourseData.js 初始化 resType 默认值改为 0
This commit is contained in:
@@ -12,8 +12,9 @@ import VideoComp from "@/components/CreatedCourse/preview/VideoComp.vue";
|
||||
import AudioComp from "@/components/CreatedCourse/preview/AudioComp.vue";
|
||||
import EditorComp from "@/components/CreatedCourse/preview/EditorComp.vue";
|
||||
import DocComp from "@/components/CreatedCourse/preview/DocComp.vue";
|
||||
import LinkComp from "@/components/CreatedCourse/preview/LinkComp.vue";
|
||||
import { getType } from "@/hooks/useCreateCourseMaps";
|
||||
const mapComponents = [VideoComp, AudioComp, EditorComp, DocComp];
|
||||
const mapComponents = [VideoComp, AudioComp, EditorComp, DocComp, LinkComp];
|
||||
|
||||
// 使用课程数据hook
|
||||
const { courseMetadata, courseList, courseActionButtons, addChapter } =
|
||||
@@ -46,7 +47,9 @@ const courseOperations = {
|
||||
showSettingDialog.value = true;
|
||||
},
|
||||
addExternalLink: () => {
|
||||
console.log("添加外部链接功能调用");
|
||||
courseMetadata.resType = 52;
|
||||
chooseItemData.value.resType = 52;
|
||||
showSettingDialog.value = true;
|
||||
},
|
||||
addScorm: () => {
|
||||
console.log("添加SCORM功能调用");
|
||||
|
||||
Reference in New Issue
Block a user