Commit 5450534a80076e8ae8a7242b645e2ce41ab55841
1 parent
5311f579
fix: uploadFile filelist
Showing
1 changed file
with
3 additions
and
0 deletions
yudao-ui-admin-vue3/src/components/UploadFile/src/UploadFile.vue
| ... | ... | @@ -99,6 +99,9 @@ const beforeUpload: UploadProps['beforeUpload'] = (file: UploadRawFile) => { |
| 99 | 99 | // 文件上传成功 |
| 100 | 100 | const handleFileSuccess: UploadProps['onSuccess'] = (res: any): void => { |
| 101 | 101 | message.success('上传成功') |
| 102 | + const fileListNew = fileList.value | |
| 103 | + fileListNew.pop() | |
| 104 | + fileList.value = fileListNew | |
| 102 | 105 | uploadList.value.push({ name: res.data, url: res.data }) |
| 103 | 106 | if (uploadList.value.length == uploadNumber.value) { |
| 104 | 107 | fileList.value = fileList.value.concat(uploadList.value) | ... | ... |