文件上传

pull/781/head
zy 2025-05-15 10:30:56 +08:00
parent 0ea5bb7d9b
commit dd2242e2be
1 changed files with 1 additions and 2 deletions

View File

@ -133,8 +133,7 @@ const handleFileSuccess: UploadProps['onSuccess'] = (res: any): void => {
// //
const index = fileList.value.findIndex((item) => item.response?.data === res.data) const index = fileList.value.findIndex((item) => item.response?.data === res.data)
fileList.value.splice(index, 1) fileList.value.splice(index, 1)
console.log('%csrc/components/UploadFile/src/UploadFile.vue:136 res', 'color: #007acc;', res); uploadList.value.push({ name: res.data, url: res.data })
uploadList.value.push({ url: res.data })
if (uploadList.value.length == uploadNumber.value) { if (uploadList.value.length == uploadNumber.value) {
fileList.value.push(...uploadList.value) fileList.value.push(...uploadList.value)
uploadList.value = [] uploadList.value = []