//流程节点内容修改,把最新的值赋值给传值对象 e.newValue let nodeOrLinkList=self.myDiagram.selection; let key=""; nodeOrLinkList.each((nodeOrLink)=>{ if(nodeOrLink instanceof go.Node){ //获取选中节点 key=nodeOrLink.data.key; }else if(nodeOrLink instanceof go.Link){ //获取选中的连线 var from=nodeOrLink.data.from; var to=nodeOrLink.data.to; } }) self.flowModel.node.forEach((node,index)=>{ let newToValue=""; if(node.code==key){ node.name=e.newValue; } })
标签:node,nodeOrLink,选中,key,let,GOJS,节点 From: https://www.cnblogs.com/sexintercourse/p/17169327.html