|
@ -106,12 +106,12 @@ const beforeUpload: UploadProps['beforeUpload'] = (file: UploadRawFile) => { |
|
|
// uploadRef.value.data.path = uploadFile.name |
|
|
// uploadRef.value.data.path = uploadFile.name |
|
|
// } |
|
|
// } |
|
|
// 文件上传成功 |
|
|
// 文件上传成功 |
|
|
const handleFileSuccess: UploadProps['onSuccess'] = (res: any): void => { |
|
|
const handleFileSuccess: UploadProps['onSuccess'] = (res: any,uploadFile: any): void => { |
|
|
message.success('上传成功') |
|
|
message.success('上传成功') |
|
|
const fileListNew = fileList.value |
|
|
const fileListNew = fileList.value |
|
|
fileListNew.pop() |
|
|
fileListNew.pop() |
|
|
fileList.value = fileListNew |
|
|
fileList.value = fileListNew |
|
|
uploadList.value.push({ name: res.data, url: res.data }) |
|
|
uploadList.value.push({ name: uploadFile.name, url: res.data }) |
|
|
if (uploadList.value.length == uploadNumber.value) { |
|
|
if (uploadList.value.length == uploadNumber.value) { |
|
|
fileList.value = fileList.value.concat(uploadList.value) |
|
|
fileList.value = fileList.value.concat(uploadList.value) |
|
|
uploadList.value = [] |
|
|
uploadList.value = [] |
|
|