fix
This commit is contained in:
@@ -58,7 +58,9 @@ export class StateManager {
|
||||
this.activeNodeID = ref("")
|
||||
this.nodes = ref<NodesItem[]>([]);
|
||||
this.nodes_ = computed(() => {
|
||||
console.log(1)
|
||||
return this.nodes.value.map((node, index) => {
|
||||
console.log(2)
|
||||
const obj = node;
|
||||
const superiorID = node.data.superiorID;
|
||||
const isSuperior = this.nodes.value.some((v) => v.id === superiorID)
|
||||
@@ -72,12 +74,14 @@ export class StateManager {
|
||||
} else {// 其他情况-没有上级 没有下级
|
||||
obj.type = NODE_TYPE.ALONE;
|
||||
}
|
||||
console.log(22)
|
||||
return obj
|
||||
})
|
||||
})
|
||||
|
||||
this.edges = computed(() => {
|
||||
const arr = []
|
||||
console.log(3)
|
||||
this.nodes.value.forEach((node, index) => {
|
||||
const superiorID = node.data.superiorID;
|
||||
const isSuperior = this.nodes.value.some((v) => v.id === superiorID)
|
||||
@@ -94,6 +98,7 @@ export class StateManager {
|
||||
})
|
||||
}
|
||||
})
|
||||
console.log(4)
|
||||
return arr
|
||||
})
|
||||
window.nodes = this.nodes
|
||||
|
||||
Reference in New Issue
Block a user