From 7c1c459e3b3c30878ee4fa93642bd0f7e2e9686b Mon Sep 17 00:00:00 2001 From: Seven Date: Thu, 15 Jan 2026 01:30:25 +0700 Subject: [PATCH] =?UTF-8?q?feat:=20=E4=BC=98=E5=8C=96=E6=96=87=E4=BB=B6?= =?UTF-8?q?=E4=B8=8A=E4=BC=A0=E9=80=BB=E8=BE=91=EF=BC=8C=E7=A1=AE=E4=BF=9D?= =?UTF-8?q?=E6=9B=B4=E6=96=B0=E7=9A=84=E6=96=87=E4=BB=B6=20ID=20=E4=B8=8D?= =?UTF-8?q?=E4=B8=BA=E7=A9=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/upload/index.vue | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/components/upload/index.vue b/src/components/upload/index.vue index fe14ccd..1f5d142 100644 --- a/src/components/upload/index.vue +++ b/src/components/upload/index.vue @@ -102,13 +102,12 @@ async function handleCustomRequest({ file, onProgress, onFinish, onError }: Uplo onProgress({ percent }); } }); - // 直接修改 file 对象的 id,NaiveUI 会自动同步到 fileList file.id = fileId; file.status = 'finished'; file.url = fileId; - const newFileIds = [...props.modelValue, fileId]; + const newFileIds = [...props.modelValue, fileId].filter(Boolean); emit('update:modelValue', newFileIds); onFinish();