feat: 本次提交更新内容如下

功能没问题
This commit is contained in:
笔记本里的永平
2025-07-15 10:48:13 +08:00
parent cc6c3687ad
commit d2052e2825

View File

@@ -12,6 +12,7 @@ import UnifiedHeader from '@/components/UnifiedHeader';
import { get, post, put } from '@/api/request';
import { Image as ImageIcon, Link as LinkIcon, Video as VideoIcon, FileText, Layers, UploadCloud } from 'lucide-react';
import { Upload } from 'tdesign-mobile-react';
import type { UploadFile } from 'tdesign-mobile-react/es/upload/type';
export default function NewMaterial() {
const navigate = useNavigate();
@@ -229,18 +230,15 @@ export default function NewMaterial() {
{/* 素材上传分组(仅图片类型和小程序类型) */}
{(contentType === 1 || contentType === 5) && (
<div className="mb-6">
<div className="text-xs text-gray-400 mb-2 tracking-widest"></div>
<div className="text-xs text-gray-400 mb-2 tracking-widest">9</div>
{contentType === 1 && (
<div className="mb-6">
<div className="text-xs text-gray-400 mb-2 tracking-widest"></div>
<Upload
files={images.map(url => ({ url }))}
onChange={({ files }) => setImages(files.map(f => f.url))}
onChange={(files: UploadFile[]) => setImages(files.map((f: any) => f.url))}
multiple
accept="image/*"
max={9}
theme="image"
tips="支持JPG、PNG格式最多9张"
/>
</div>
)}