Using the Upload component of element to upload three images in vue, the on-success hook was executed only once, but all the images were uploaded successfully.

clipboard.png

the three pictures I uploaded here have been successful

but only executed once
: on-success

so I can"t add the uploaded picture to the list of uploaded pictures
this is my upload component code:

<el-upload
            multiple
            name="picture"
            :action="uploadFileUrl"
            :file-list="goodsImages"
            :on-remove="(file, fileList) => { return handleUploaderRemove(file, fileList, "goodsImagesUploader") }"
            :on-success="handleGoodsImagesUploadSuccess"
            :before-upload="(file) => { return handleBeforeUpload(file, "0")}"
            :limit="6"
            list-type="picture-card"
          >

handleGoodsImagesUploadSuccess function:

handleGoodsDetailUploadSuccess (response, file, fileList) {
      console.log("", response)
        let tempUploadList = {
          flag: 1,
          status: file.status,
          uid: file.uid,
          url: response.data
        }
        this.detailImages.push(tempUploadList)
    },
Mar.18,2022
fileList in
handleGoodsDetailUploadSuccess is not the picture list


I have also encountered this problem. The success callback only has one value in the response, which makes it impossible to get the data returned after all the uploads are successful. How do you solve this problem

?
Menu