Has anyone ever used the plug-in vue-orgchart or jq's orgchart? How do I add a click event to a node?

plugin address: https://spiritree.github.io/v.
github address: https://github.com/spiritree/.

how do I display the picture on the node? How to implement click events on nodes?


node.addEventListener('click', () => {})

var oc=$ ('- sharpid'). Orgchart ({

)
  'data' : datascource,
  'depth': 2,
  'nodeTitle': 'name',
  'nodeContent': 'title'
});

oc.$chart.find('.node').on('click', function() {
    alert(1
}



use VoEdit
official documentation: https://spiritree.github.io/v.

when you click on a node, automatically fill its value into < input type= "text" v id= model = "clickNodeName" id= "selected-node" >, and
then listen for changes in clickNodeName, that is, click event callback

.

Menu