fix:处理因为改变addEventLister方法造成的报错问题

This commit is contained in:
zhangyu
2020-11-20 18:03:57 +08:00
parent 74d8f02a73
commit 4f2d0b3e54
6 changed files with 21 additions and 12 deletions

View File

@@ -207,7 +207,9 @@
this.edgesArray=[];
setTimeout(()=>{
this.topologyLoading=false;
this.$refs['topology'].setData();
if(this.$refs['topology']){
this.$refs['topology'].setData();
}
},100)
}
if(res.data.topo){
@@ -261,7 +263,9 @@
this.edgesArray=[...this.edgesArrayOther];
setTimeout(()=>{
this.topologyLoading=false;
this.$refs['topology'].setData();
if(this.$refs['topology']){
this.$refs['topology'].setData();
}
},500)
})
// }
@@ -276,7 +280,9 @@
this.nodesArray=[...this.nodesArrayOther];
this.edgesArray=[...this.edgesArrayOther];
this.topologyLoading=false;
this.$refs['topology'].setData();
if(this.$refs['topology']){
this.$refs['topology'].setData();
}
})
});
return arr