-
+ {icon}
- 点击或拖拽文件到此区域进行上传
+ {description}
{multiple ? "支持单个或批量上传文件" : "仅支持上传单个文件"}
- {allowTypes && (
+ {/* {allowTypes && (
允许类型: {allowTypes.join(", ")}
- )}
+ )} */}
diff --git a/apps/web/src/components/models/course/editor/form/CourseContentForm/SortableLecture.tsx b/apps/web/src/components/models/course/editor/form/CourseContentForm/SortableLecture.tsx
index 2d9bfd2..368f1e7 100755
--- a/apps/web/src/components/models/course/editor/form/CourseContentForm/SortableLecture.tsx
+++ b/apps/web/src/components/models/course/editor/form/CourseContentForm/SortableLecture.tsx
@@ -3,6 +3,8 @@ import {
CaretRightOutlined,
SaveOutlined,
CaretDownOutlined,
+ PaperClipOutlined,
+ PlaySquareOutlined,
} from "@ant-design/icons";
import { Form, Button, Input, Select, Space } from "antd";
import React, { useState } from "react";
@@ -86,12 +88,12 @@ export const SortableLecture: React.FC = ({
resources:
[videoUrlId, ...fileIds].filter(Boolean)?.length > 0
? {
- connect: [videoUrlId, ...fileIds]
- .filter(Boolean)
- .map((fileId) => ({
- fileId,
- })),
- }
+ connect: [videoUrlId, ...fileIds]
+ .filter(Boolean)
+ .map((fileId) => ({
+ fileId,
+ })),
+ }
: undefined,
content: values?.content,
},
@@ -115,12 +117,12 @@ export const SortableLecture: React.FC = ({
resources:
[videoUrlId, ...fileIds].filter(Boolean)?.length > 0
? {
- set: [videoUrlId, ...fileIds]
- .filter(Boolean)
- .map((fileId) => ({
- fileId,
- })),
- }
+ set: [videoUrlId, ...fileIds]
+ .filter(Boolean)
+ .map((fileId) => ({
+ fileId,
+ })),
+ }
: undefined,
content: values?.content,
},
@@ -175,30 +177,42 @@ export const SortableLecture: React.FC = ({
/>
-
+
{lectureType === LectureType.VIDEO ? (
<>
-
-
+ {/* 添加视频 */}
+
+ }
+ description="点击或拖拽视频到此区域进行上传"
+ />
+
+
+
+ {/* 添加附件 */}
+
+ }
+ description="点击或拖拽附件到此区域进行上传"
/>
-
-
-
-
+
+
>
-
+
) : (
= ({
]}>