bug 79890
This commit is contained in:
@@ -323,14 +323,17 @@ export default {
|
|||||||
* @param nodeId
|
* @param nodeId
|
||||||
*/
|
*/
|
||||||
searchNode (nodeId) {
|
searchNode (nodeId) {
|
||||||
const item = this.graph.findById(nodeId)
|
|
||||||
this.graph.setItemState(nodeId, 'selected', true)
|
|
||||||
if (this.lastQueryId) {
|
if (this.lastQueryId) {
|
||||||
this.graph.setItemState(this.lastQueryId, 'selected', false)
|
this.graph.setItemState(this.lastQueryId, 'selected', false)
|
||||||
}
|
}
|
||||||
if (this.selectedNodeId) {
|
if (this.selectedNodeId) {
|
||||||
this.graph.setItemState(this.selectedNodeId, 'selected', false)
|
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)
|
const node = this.graph.findById(nodeId)
|
||||||
this.selectedNodeId = nodeId
|
this.selectedNodeId = nodeId
|
||||||
this.$emit('select', node._cfg.model)
|
this.$emit('select', node._cfg.model)
|
||||||
|
|||||||
@@ -126,7 +126,12 @@ export default {
|
|||||||
this.nodeNameList = this.defaultNodeNameList.filter(tt => tt.name.toLowerCase().indexOf(this.nodeName.toLowerCase()) !== -1)
|
this.nodeNameList = this.defaultNodeNameList.filter(tt => tt.name.toLowerCase().indexOf(this.nodeName.toLowerCase()) !== -1)
|
||||||
},
|
},
|
||||||
searchReset () {
|
searchReset () {
|
||||||
|
this.nodeName = null
|
||||||
|
this.nodeNameList = []
|
||||||
|
this.currentNodeName = null
|
||||||
|
this.selectedNode = {}
|
||||||
|
this.selectedNodeId = null
|
||||||
|
this.$refs.mindMap.searchNode()
|
||||||
},
|
},
|
||||||
searchQuery () {
|
searchQuery () {
|
||||||
this.showSearch = true
|
this.showSearch = true
|
||||||
@@ -301,6 +306,7 @@ export default {
|
|||||||
border-top: 1px solid #E5E6EB;
|
border-top: 1px solid #E5E6EB;
|
||||||
padding: 8px;
|
padding: 8px;
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
|
z-index: 99;
|
||||||
}
|
}
|
||||||
|
|
||||||
.hide-search {
|
.hide-search {
|
||||||
|
|||||||
Reference in New Issue
Block a user