Skip to content

Commit

Permalink
修复多图组件验证失败被删除问题
Browse files Browse the repository at this point in the history
  • Loading branch information
yangzongzhuan committed Sep 10, 2021
1 parent 15abd4d commit 04c3406
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions ruoyi-ui/src/components/ImageUpload/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,10 @@ export default {
// 删除图片
handleRemove(file, fileList) {
const findex = this.fileList.map(f => f.name).indexOf(file.name);
this.fileList.splice(findex, 1);
this.$emit("input", this.listToString(this.fileList));
if(findex > -1) {
this.fileList.splice(findex, 1);
this.$emit("input", this.listToString(this.fileList));
}
},
// 上传成功回调
handleUploadSuccess(res) {
Expand Down

0 comments on commit 04c3406

Please sign in to comment.