vue-context-menu
vue-context-menu copied to clipboard
contextMenuTarget?
Hi
how would i set up different place instead of document.body?
This doesn't work
contextMenuTarget: document.querySelector('.header')
Hi there, thanks for your report.
I will check that.
@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
.
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?)
why not set contextMenuTarget prop to css selector string
Uh...when i run
npm install @xunlei/vue-context-menu
it reports a 404 error