// for (let index = 0; index < this.records.length; index++) {
constelement={
// const element ={
fill:this.records[index].fill,
// fill: this.records[index].fill,
height:this.records[index].height,
// height: this.records[index].height,
id:this.records[index].id,
// id: this.records[index].id,
left:this.records[index].left,
// left: this.records[index].left,
opacity:this.records[index].opacity,
// opacity: this.records[index].opacity,
stroke:this.records[index].stroke,
// stroke: this.records[index].stroke,
strokeWidth:this.records[index].strokeWidth,
// strokeWidth: this.records[index].strokeWidth,
top:this.records[index].top,
// top: this.records[index].top,
type:this.records[index].type,
// type: this.records[index].type,
width:this.records[index].width,
// width: this.records[index].width,
};
// };
if(element.id==res.id){
// if(element.id == res.id){
// console.log(element)
// // console.log(element)
this.records[index]=res;
// this.records[index] = res;
flag=true;
// flag = true;
}
// }
}
// }
}else{
// } else {
this.records=[];
// this.records = [];
}
// }
if(!flag){
// if(!flag){
this.records.push(res)
// this.records.push(res)
}
// }
},
// },
// FIXME 没写完
asyncreShow(list){
list=JSON.parse('[{"id":2,"type":"i-text","left":55.26947693665858,"top":180.32266601562497,"width":200,"height":45.199999999999996,"fill":"#000000","stroke":null,"strokeWidth":1,"opacity":1,"angle":0,"text":"请输入文字","fontFamily":"Times New Roman","fontSize":40,"fontStyle":"normal","textAlign":"left","fontWeight":"normal"},{"id":3,"type":"image","left":195.71660545226203,"top":506.3232314730081,"width":500,"height":500,"fill":"rgb(0,0,0)","stroke":null,"strokeWidth":0,"opacity":1,"angle":0},{"id":4,"type":"image","left":373.102002853498,"top":190.44302690999768,"width":792,"height":792,"fill":"rgb(0,0,0)","stroke":null,"strokeWidth":0,"opacity":1,"angle":0}]');