修复多图组件验证失败被删除问题

This commit is contained in:
RuoYi 2021-09-10 11:06:25 +08:00
parent 15abd4d053
commit 04c340627d
1 changed files with 4 additions and 2 deletions

View File

@ -117,8 +117,10 @@ export default {
// //
handleRemove(file, fileList) { handleRemove(file, fileList) {
const findex = this.fileList.map(f => f.name).indexOf(file.name); const findex = this.fileList.map(f => f.name).indexOf(file.name);
this.fileList.splice(findex, 1); if(findex > -1) {
this.$emit("input", this.listToString(this.fileList)); this.fileList.splice(findex, 1);
this.$emit("input", this.listToString(this.fileList));
}
}, },
// //
handleUploadSuccess(res) { handleUploadSuccess(res) {