rev:解决模型数据为空时,编辑流程出错
This commit is contained in:
@@ -94,6 +94,7 @@ export default {
|
|||||||
left: 0
|
left: 0
|
||||||
},
|
},
|
||||||
id: null,
|
id: null,
|
||||||
|
initNodes: {"nodes": [], "edges": []},
|
||||||
nodeData: null,
|
nodeData: null,
|
||||||
addClickNode: null,
|
addClickNode: null,
|
||||||
clickNode: null,
|
clickNode: null,
|
||||||
@@ -224,7 +225,11 @@ export default {
|
|||||||
*/
|
*/
|
||||||
$_render(row) {
|
$_render(row) {
|
||||||
this.id = row.id
|
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()
|
this.$_LfEvent()
|
||||||
},
|
},
|
||||||
$_getData() {
|
$_getData() {
|
||||||
|
|||||||
Reference in New Issue
Block a user