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)
},
element-ui 上传完成编辑回显删除对应的图片
最后编辑于 :
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。