feat: 本次提交更新内容如下
功能没问题
This commit is contained in:
@@ -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>
|
||||
)}
|
||||
|
||||
Reference in New Issue
Block a user