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

之前在issue提出解决方案后被采纳后便继续开发。被回复后希望也能成为贡献者, 补交一个PR
handleRemove(file, fileList) {
  const findex = this.fileList.map(f => f.name).indexOf(file.name);
  if(findex > -1) {
	this.fileList.splice(findex, 1);
	this.$emit("input", this.listToString(this.fileList));
  }
},
This commit is contained in:
raymonddddd
2021-09-13 07:47:45 +00:00
committed by Gitee
parent db193a46e8
commit 374afbefda

View File

@ -117,6 +117,7 @@ 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);
//修复多图组件验证失败被删除问题
if(findex > -1) { if(findex > -1) {
this.fileList.splice(findex, 1); this.fileList.splice(findex, 1);
this.$emit("input", this.listToString(this.fileList)); this.$emit("input", this.listToString(this.fileList));