From 6a895735583885e2a4de454ec5989850550cf23e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=AC=94=E8=AE=B0=E6=9C=AC=E9=87=8C=E7=9A=84=E6=B0=B8?= =?UTF-8?q?=E5=B9=B3?= Date: Tue, 15 Jul 2025 15:09:15 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=9C=AC=E6=AC=A1=E6=8F=90=E4=BA=A4?= =?UTF-8?q?=E6=9B=B4=E6=96=B0=E5=86=85=E5=AE=B9=E5=A6=82=E4=B8=8B=20?= =?UTF-8?q?=E5=9B=BE=E7=89=87=E4=B8=8A=E4=BC=A0=E7=9A=84=E6=A8=A1=E5=9D=97?= =?UTF-8?q?=E5=A4=84=E7=90=86=E5=AE=8C=E6=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- nkebao/src/pages/content/materials/New.tsx | 38 +++++++++++----------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/nkebao/src/pages/content/materials/New.tsx b/nkebao/src/pages/content/materials/New.tsx index 43cbb938d..760da842a 100644 --- a/nkebao/src/pages/content/materials/New.tsx +++ b/nkebao/src/pages/content/materials/New.tsx @@ -194,17 +194,15 @@ export default function NewMaterial() { />
- {!coverImage ? ( - - ) : ( -
- 封面图 - -
- )} + { + setCoverImage(urls[0]); + setUploadFiles(urls.map(url => ({ url }))); + }} + max={1} + accept="image/*" + />
{/* 素材上传分组(仅图片类型和小程序类型) */} - {(contentType === 1 || contentType === 5) && ( + {([1,5].includes(contentType)) && (
素材上传(最多上传9张)
{contentType === 1 && ( @@ -250,7 +248,6 @@ export default function NewMaterial() { }} max={9} accept="image/*" - disabled={isSubmitting} />
)} @@ -261,12 +258,15 @@ export default function NewMaterial() { -
- -
+ { + setImages(urls); + setUploadFiles(urls.map(url => ({ url }))); + }} + max={9} + accept="image/*" + /> )}