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

contextMenuTarget? #2

Open
plavet opened this issue Jul 30, 2017 · 4 comments
Open

contextMenuTarget? #2

plavet opened this issue Jul 30, 2017 · 4 comments

Comments

@plavet
Copy link

plavet commented Jul 30, 2017

Hi
how would i set up different place instead of document.body?
This doesn't work
contextMenuTarget: document.querySelector('.header')

@binggg
Copy link
Contributor

binggg commented Jul 31, 2017

Hi there, thanks for your report.

I will check that.

@binggg
Copy link
Contributor

binggg commented Jul 31, 2017

@plavet
When do you set contextMenuTarget ?
contextMenuTarget: document.querySelector('.header')

If .header has not mounted, you won't select it.

So you can set contextMenuTarget in the mounted hook of your component which contains .header.

@Rylai-Zihang
Copy link

I wonder how can I get the target element when I clicked the context menu?(If it is not supported how can I copy text?)

@chbro
Copy link

chbro commented Dec 22, 2017

why not set contextMenuTarget prop to css selector string

Uh...when i run

npm install @xunlei/vue-context-menu

it reports a 404 error

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

4 participants