handleRemove(file, fileList) {
// console.log(file,file.response.msg);
// console.log(file)
if (file.response) {
const index = this.dpgl.Sfz.findIndex(fruit => fruit === file.response.msg);
// console.log(index) //他的下标
// console.log(this.dpgl.Sfz[index]) //他的路径
if (index != '-1') {
this.dpgl.Sfz.splice(index, 1)
}
} else {
const index = this.dpgl.Sfz.findIndex(fruit => fruit === file.url);
// console.log(index) //他的下标
// console.log(this.dpgl.Sfz[index]) //他的路径
if (index != '-1') {
this.dpgl.Sfz.splice(index, 1)
}
}
},
//上传成功push到 Sfz数组当中
Success(file) {
this.dpgl.Sfz.push(file.msg)
// console.log(this.dpgl.Sfz)
},
网友评论