bug 79890

This commit is contained in:
赵霄
2023-12-26 11:03:46 +08:00
parent dbb3e1090e
commit 2dbd5f17ea
2 changed files with 12 additions and 3 deletions
+5 -2
View File
@@ -323,14 +323,17 @@ export default {
* @param nodeId
*/
searchNode (nodeId) {
const item = this.graph.findById(nodeId)
this.graph.setItemState(nodeId, 'selected', true)
if (this.lastQueryId) {
this.graph.setItemState(this.lastQueryId, 'selected', false)
}
if (this.selectedNodeId) {
this.graph.setItemState(this.selectedNodeId, 'selected', false)
}
if (!nodeId) {
return
}
const item = this.graph.findById(nodeId)
this.graph.setItemState(nodeId, 'selected', true)
const node = this.graph.findById(nodeId)
this.selectedNodeId = nodeId
this.$emit('select', node._cfg.model)