vue-context-menu icon indicating copy to clipboard operation
vue-context-menu copied to clipboard

contextMenuTarget?

Open plavet opened this issue 7 years ago • 4 comments

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

plavet avatar Jul 30 '17 00:07 plavet

Hi there, thanks for your report.

I will check that.

binggg avatar Jul 31 '17 02:07 binggg

@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.

binggg avatar Jul 31 '17 10:07 binggg

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?)

Rylai-Zihang avatar Nov 28 '17 09:11 Rylai-Zihang

why not set contextMenuTarget prop to css selector string

Uh...when i run

npm install @xunlei/vue-context-menu

it reports a 404 error

chbro avatar Dec 22 '17 02:12 chbro