修复preview bug
This commit is contained in:
@@ -251,12 +251,22 @@ export default defineComponent({
|
||||
},
|
||||
soleId(arr,index){
|
||||
let randomNum = Math.floor(100 + Math.random() * 900);
|
||||
arr[index].id = this.sketchImg.id_? Number(this.sketchImg.id_+(randomNum+"")):this.current.id
|
||||
if(this.hasDuplicateId(arr)){
|
||||
this.soleId(arr,index)
|
||||
// if(this.sketchImg.id_){
|
||||
if(this.sketchImg.id){
|
||||
if(this.sketchImg.id == this.sketchImg.id_){
|
||||
arr[index].id = Number(this.sketchImg.id_+(randomNum+""))
|
||||
if(this.hasDuplicateId(arr)){
|
||||
this.sketchImg.id_ = this.sketchImg.id
|
||||
this.soleId(arr,index)
|
||||
}
|
||||
}else{
|
||||
arr[index].id = this.sketchImg.id_
|
||||
}
|
||||
}else{
|
||||
return arr
|
||||
arr[index].id = this.current.id
|
||||
}
|
||||
// arr[index].id = this.sketchImg.id_? this.sketchImg.id_:this.current.id
|
||||
return arr
|
||||
},
|
||||
//提交
|
||||
setPreview(){
|
||||
|
||||
Reference in New Issue
Block a user