G6数据修改后,数据不能正常刷新解决方法
之前用官方文档的方法试了很多遍没有用,才出此下册,
我这里是把之前实例化的组件销毁后,重新实例化
refresh: function() {
/* if (this.treeData) {
this.treeGraph.data(this.treeData);
}
this.treeGraph.render();
this.treeGraph.fitView();
this.treeGraph.refresh()*/
if (this.treeGraphData){
//销毁方法
this.treeGraph.destroy();
}
//重新实例化
this.initG6();
},