文件上传
parent
0ea5bb7d9b
commit
dd2242e2be
|
|
@ -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 = []
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue