From 5450534a80076e8ae8a7242b645e2ce41ab55841 Mon Sep 17 00:00:00 2001 From: xingyu Date: Mon, 16 Jan 2023 16:53:13 +0800 Subject: [PATCH] fix: uploadFile filelist --- .../src/components/UploadFile/src/UploadFile.vue | 3 +++ 1 file changed, 3 insertions(+) diff --git a/yudao-ui-admin-vue3/src/components/UploadFile/src/UploadFile.vue b/yudao-ui-admin-vue3/src/components/UploadFile/src/UploadFile.vue index ac97a7e30..4706cac93 100644 --- a/yudao-ui-admin-vue3/src/components/UploadFile/src/UploadFile.vue +++ b/yudao-ui-admin-vue3/src/components/UploadFile/src/UploadFile.vue @@ -99,6 +99,9 @@ const beforeUpload: UploadProps['beforeUpload'] = (file: UploadRawFile) => { // 文件上传成功 const handleFileSuccess: UploadProps['onSuccess'] = (res: any): void => { message.success('上传成功') + const fileListNew = fileList.value + fileListNew.pop() + fileList.value = fileListNew uploadList.value.push({ name: res.data, url: res.data }) if (uploadList.value.length == uploadNumber.value) { fileList.value = fileList.value.concat(uploadList.value)