This commit is contained in:
lzp
2026-03-13 11:18:36 +08:00
parent c2e26f0328
commit 3b320d0867
12 changed files with 180 additions and 50 deletions

View File

@@ -120,7 +120,7 @@
const onGenerateClick = async () => {
const data = componentRef.value.data
const subordNode = stateManager.getSubordNodeByID(attrs.node.id)
const subordNode = stateManager.getSubordNodeById(attrs.node.id)
emit('update-data', data)
console.log(attrs.node,data)
if(!attrs.node?.data?.originalImage)console.log('originalImage 找不到原始图片')

View File

@@ -19,7 +19,7 @@ export class FlowManager {
}
return null;
}
getSubordNodeByID(id: string) {
getSubordNodeById(id: string) {
return this.vueFlow.value.getNodes?.find((v) => v.data.superiorID === id)
}

View File

@@ -131,7 +131,7 @@ export class StateManager {
/** 获取节点 */
getNodeById(id: string) { return this.nodes.value.find((node: NodesItem) => node.id === id) }
/** 获取下级节点 */
getSubordNodeByID(id: string) { return this.nodes.value.find((node: NodesItem) => node.data.superiorID === id) }
getSubordNodeById(id: string) { return this.nodes.value.find((node: NodesItem) => node.data.superiorID === id) }
getLastNode() { return this.nodes.value[this.nodes.value.length - 1] }
/** 设置工具 */
setTool(tool: string) { this.tool.value = tool }