El-upload manual upload file overwrite problem

problem description

el-upload manual file upload, found a problem, when set: limit=1, upload a file, and then upload a file, and then upload the file can not overwrite the previously uploaded file, is there any way to make it automatically overwritten? Of course, other methods are also fine.

related codes

here is the code I fork, both of which are the same.
1.fiddle
https://jsfiddle.net/vine_yip...

2.codepen
https://codepen.io/Vine_Yip/p...

what result do you expect? What is the error message actually seen?

automatically overwrite ~


No limit

:on-change="handleChange"
handleChange(files, fileList) {
   if (fileList.length > 1) {
       fileList.splice(0, 1);
   }
}

instead of using the limit attribute, use the following example to change it to the style you want.

@</a>  

handleExceed(files, fileList) {
    fileList[0].name = files[0].name;
},
Menu