rht03022103
This commit is contained in:
parent
37eff0e67c
commit
f3d63d125d
|
@ -82,54 +82,57 @@ export default function ResourcesShower({
|
||||||
</Image.PreviewGroup>
|
</Image.PreviewGroup>
|
||||||
</Row>
|
</Row>
|
||||||
)}
|
)}
|
||||||
<div className=" text-sm px-2">附件:</div>
|
|
||||||
{fileResources.length > 0 && (
|
|
||||||
<div className="rounded-xl p-1 border border-gray-100 bg-white">
|
|
||||||
<div className="flex flex-nowrap overflow-x-auto scrollbar-hide gap-1.5">
|
|
||||||
{fileResources.map((resource) => {
|
|
||||||
return (
|
|
||||||
<a
|
|
||||||
key={resource.url}
|
|
||||||
className="flex-shrink-0 relative active:scale-95 transition-transform select-none "
|
|
||||||
href={resource.originalUrl}
|
|
||||||
target="_blank"
|
|
||||||
download={true}
|
|
||||||
title="点击下载文件">
|
|
||||||
{/* 超紧凑卡片容器 */}
|
|
||||||
<div className="w-[120px] h-[80px] p-2 flex flex-col items-center justify-between rounded-xl hover:bg-primary-50/40 cursor-pointer">
|
|
||||||
{/* 微型文件图标 */}
|
|
||||||
<div className="text-primary-600 text-base">
|
|
||||||
{getFileIcon(resource.url)}
|
|
||||||
</div>
|
|
||||||
|
|
||||||
{/* 压缩信息展示 */}
|
{fileResources.length > 0 && (
|
||||||
<div className="w-full text-center space-y-0.5">
|
<>
|
||||||
<p className="text-xs font-medium text-gray-800 truncate">
|
<div className=" text-sm px-2">附件:</div>
|
||||||
{resource.title?.slice(0, 12) ||
|
<div className="rounded-xl p-1 border border-gray-100 bg-white">
|
||||||
"未命名"}
|
<div className="flex flex-nowrap overflow-x-auto scrollbar-hide gap-1.5">
|
||||||
</p>
|
{fileResources.map((resource) => {
|
||||||
<div className="flex items-center justify-between text-xs text-gray-500 ">
|
return (
|
||||||
<span className="bg-gray-100 px-0.5 rounded-sm mr-2 whitespace-pre-wrap">
|
<a
|
||||||
{resource.url
|
key={resource.url}
|
||||||
.split(".")
|
className="flex-shrink-0 relative active:scale-95 transition-transform select-none "
|
||||||
.pop()
|
href={resource.originalUrl}
|
||||||
?.slice(0, 4)
|
target="_blank"
|
||||||
.toUpperCase()}
|
download={true}
|
||||||
</span>
|
title="点击下载文件">
|
||||||
<span className="flex bg-gray-100 px-0.5 rounded-sm justify-items-center whitespace-pre-wrap">
|
{/* 超紧凑卡片容器 */}
|
||||||
{resource.meta.size &&
|
<div className="w-[120px] h-[80px] p-2 flex flex-col items-center justify-between rounded-xl hover:bg-primary-50/40 cursor-pointer">
|
||||||
formatFileSize(
|
{/* 微型文件图标 */}
|
||||||
resource.meta.size
|
<div className="text-primary-600 text-base">
|
||||||
)}
|
{getFileIcon(resource.url)}
|
||||||
</span>
|
</div>
|
||||||
|
|
||||||
|
{/* 压缩信息展示 */}
|
||||||
|
<div className="w-full text-center space-y-0.5">
|
||||||
|
<p className="text-xs font-medium text-gray-800 truncate">
|
||||||
|
{resource.title?.slice(0, 12) ||
|
||||||
|
"未命名"}
|
||||||
|
</p>
|
||||||
|
<div className="flex items-center justify-between text-xs text-gray-500 ">
|
||||||
|
<span className="bg-gray-100 px-0.5 rounded-sm mr-2 whitespace-pre-wrap">
|
||||||
|
{resource.url
|
||||||
|
.split(".")
|
||||||
|
.pop()
|
||||||
|
?.slice(0, 4)
|
||||||
|
.toUpperCase()}
|
||||||
|
</span>
|
||||||
|
<span className="flex bg-gray-100 px-0.5 rounded-sm justify-items-center whitespace-pre-wrap">
|
||||||
|
{resource.meta.size &&
|
||||||
|
formatFileSize(
|
||||||
|
resource.meta.size
|
||||||
|
)}
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</a>
|
||||||
</a>
|
);
|
||||||
);
|
})}
|
||||||
})}
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|
|
@ -69,12 +69,15 @@ export const CourseDetailDescription: React.FC = () => {
|
||||||
<div className="text-lg font-bold">{"课程简介:"}</div>
|
<div className="text-lg font-bold">{"课程简介:"}</div>
|
||||||
<div className="flex flex-col gap-2">
|
<div className="flex flex-col gap-2">
|
||||||
<div className="flex gap-2 flex-wrap items-center float-start">
|
<div className="flex gap-2 flex-wrap items-center float-start">
|
||||||
{post?.subTitle && <div>{post?.subTitle}</div>}
|
|
||||||
<TermInfo terms={post.terms}></TermInfo>
|
<TermInfo terms={post.terms}></TermInfo>
|
||||||
</div>
|
</div>
|
||||||
|
<div className="flex gap-2 flex-wrap items-center float-start pl-2">
|
||||||
|
{post?.subTitle && <div>{post?.subTitle}</div>}
|
||||||
|
{/* <TermInfo terms={post.terms}></TermInfo> */}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<Paragraph
|
<Paragraph
|
||||||
className="text-gray-600"
|
className="text-gray-600 pl-2"
|
||||||
ellipsis={{
|
ellipsis={{
|
||||||
rows: 3,
|
rows: 3,
|
||||||
expandable: true,
|
expandable: true,
|
||||||
|
|
|
@ -202,7 +202,11 @@ export const SortableLecture: React.FC<SortableLectureProps> = ({
|
||||||
message: "请输入内容",
|
message: "请输入内容",
|
||||||
},
|
},
|
||||||
]}>
|
]}>
|
||||||
<QuillEditor />
|
<QuillEditor
|
||||||
|
style={{
|
||||||
|
width:"700px",
|
||||||
|
}}
|
||||||
|
></QuillEditor>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
<Form.Item
|
<Form.Item
|
||||||
name={["meta", "fileIds"]}
|
name={["meta", "fileIds"]}
|
||||||
|
|
Loading…
Reference in New Issue