rev:解决模型数据为空时,编辑流程出错

This commit is contained in:
2024-04-11 11:16:01 +08:00
parent 76c13af3d3
commit 75829cf400

View File

@@ -94,6 +94,7 @@ export default {
left: 0
},
id: null,
initNodes: {"nodes": [], "edges": []},
nodeData: null,
addClickNode: null,
clickNode: null,
@@ -224,7 +225,11 @@ export default {
*/
$_render(row) {
this.id = row.id
this.lf.render(JSON.parse(row.model_editor_json))
if (!row.model_editor_json) {
this.lf.render(this.initNodes)
} else {
this.lf.render(JSON.parse(row.model_editor_json))
}
this.$_LfEvent()
},
$_getData() {