导入拆分位置错误修改

This commit is contained in:
caoyang
2022-04-18 11:59:46 +08:00
parent fa30daf9cf
commit a8bdba128b
4 changed files with 46 additions and 21 deletions
@@ -804,24 +804,39 @@
},
//上传文件
uploadSuccess1(data,imgs) {
// console.log('dataimg',data,imgs)
let lengthImg=imgs.length
uploadSuccess1(file,data,imgs,uploadFileFlag) {
console.log('dataimg',file,data,imgs,uploadFileFlag)
for(let i = this.contentList.length;i>this.addIndex;i--){
this.contentList[i+lengthImg-1]=this.contentList[i-1]
this.contentList[i]=this.contentList[i-1]
}
if(imgs && imgs.length > 0){
imgs.forEach(item => {
this.contentList[++this.addIndex]={
id:'',
type:'IMG',
itemContent:item.response.result.id,
thumbUrl:item.thumbUrl
}
})
this.contentList[++this.addIndex]={
id:'',
type:'IMG',
itemContent:file.response.result.id,
thumbUrl:file.thumbUrl
}
// let lengthImg=imgs.length
// for(let i = this.contentList.length;i>this.addIndex;i--){
// this.contentList[i+lengthImg-1]=this.contentList[i-1]
// }
//
// if(imgs && imgs.length > 0){
// imgs.forEach(item => {
// this.contentList[++this.addIndex]={
// id:'',
// type:'IMG',
// itemContent:item.response.result.id,
// thumbUrl:item.thumbUrl
// }
// })
// }
// this.$refs.uploadFile2.visible=false
this.splitVisible=false
if(uploadFileFlag==0){
this.splitVisible=false
}
console.log('conteend',data,this.contentList)
},
//点击图片预览