v-contextmenu
v-contextmenu copied to clipboard
How to access the element under the contextmenu?
I have the contextmenu over a list of <div>
(see below). How could I access the div over which I right clicked to open the contextmenu? Here is an example:
<v-contextmenu ref="contextmenu">
<v-contextmenu-item @click.prevent="showContent">Menu Item</v-contextmenu-item>
</v-contextmenu>
<div v-contextmenu:contextmenu>
<div id="aaa">Item aaa</div>
<div id="bbb">Item bbb</div>
<div id="ccc">Item ccc</div>
</div>
in the method showContent
how I could access the id of the div I right-clicked on?
Thanks for your help!
mario