How can elementUI upload multiple files only once and all files are uploaded successfully?

when elementUI uploads multiple files, it is also uploaded one by one. On-success; is called every time the upload is successful, but I only want to call the successful function when all files are uploaded successfully. What should I do with this?

Mar.03,2021

1. First of all, it must be uploaded successfully. A call to on-success
2. You can save the number of files that need to be uploaded and the number of files that have been uploaded. In the on-success callback, you can judge that if the two are equal, you can think that the upload was successful


write a counter, add 1 at a time, and finally compare with the number of files you uploaded. If it is equal, it is successful, and vice versa.

Menu