vue-simple-uploader duplicate file does not trigger fileAdded event

Chicken Soup of the Day: Pessimists Might Be Right, Optimists Often Succeed

Use the vue-simple-uploader  plugin to upload documents. After success/failure, if you upload the same file again, you will find that the fileAdded event cannot be triggered, which is a tragedy.

So you need to clear the uploaded file list in case of upload success, failure, or cancellation

The way to clear it is as follows

// vue文件中
this.$refs.uploaderRef.uploader.files = []
this.$refs.uploaderRef.uploader.fileList = []

Guess you like

Origin blog.csdn.net/qq_17335549/article/details/131938897