Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to get node item in itemEvents ? #120

Open
granty1 opened this issue Dec 23, 2020 · 0 comments
Open

How to get node item in itemEvents ? #120

granty1 opened this issue Dec 23, 2020 · 0 comments

Comments

@granty1
Copy link

granty1 commented Dec 23, 2020

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 
        },
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant