一、vue2版本
上传成功方法那里清除上传的文件
<el-upload
action=""
ref='uploadRef'
:http-request="handleFileUpload"
:limit="1"
:show-file-list="false"
:on-success="onUploadSuccess"
>
<i class="el-icon-upload2"></i>
</el-upload>
this.$refs.upload.clearFiles()
二、 vue3
const uploadRef = ref(null)
const onUploadSuccess = (files, uploadFiles) => {
nextTick(() => {
uploadRef.value.clearFiles();
})
}