How to get node item in itemEvents ?
granty1 opened this issue · comments
Grant commented
Hello, I want to customize the email menu, but how can I get the right-click node object in the customized event? In addition, do I have other methods to get the top-level Vue object? The current $parent method is not very friendly.
itemEvents: {
contextmenu: function() {
let e = arguments[2];
console.log(arguments);
arguments[2].preventDefault();
let that =
arguments[0].$parent.$parent.$parent.$parent.$parent.$parent.$parent
.$parent.$parent.$parent.$parent.$parent.$parent.$parent.$parent
.$parent;
that.left = 100;
that.left = e.clientX - 20;
that.top = e.clientY - 100;
that.contextMenuVisible = true;
// tree node operation
},