
Research
2025 Report: Destructive Malware in Open Source Packages
Destructive malware is rising across open source registries, using delays and kill switches to wipe code, break builds, and disrupt CI/CD.
@overcoder/vue-context-menu
Advanced tools
The plugin is VERY minimal and does NOT provide any styling or anything. This simplifies context menus implementation but that's it.
There are three steps for using this plugin.
<template>
...
<ContextMenu ref="contextMenu">
interesting stuff
</ContextMenu>
</template>
<script>
import ContextMenu from '@overcoder/vue-context-menu';
export default {
...
components: {
...
ContextMenu,
},
};
</script>
<ul>
<li v-for="cats in cat" :key="cat.id"
@contextmenu.prevent="event => contextMenu.open(event)">
{{ cat.name }}
</li>
</ul>
Test it out, context menu should work now (assuming
cats).
Ok first of all you noticed the event is passed to contextMenu.open and this is to determine mouse location etc.
Now this plugin supports thing called contexts, here's an example:
<ul>
<li v-for="cats in cat" :key="cat.id"
@contextmenu.prevent="event => contextMenu.open(event, cat)">
{{ cat.name }}
</li>
</ul>
You can see we provided the cat as the second parameter to contextMenu.open. We gave it a context. Now you can access this context within the menu itself:
<ContextMenu ref="contextMenu">
<template v-slot="slotProps"> <!-- slotsProps are props passed from child to slot in parent -->
<!-- Now, here slotProps.ctx does contain the context (cat) BUT -->
<template v-if="slotProps.ctx"> <!-- we need to add this since context is null on initial render -->
<!-- Now we can peacefully access slotProps.ctx without getting any errors -->
{{ slotProps.ctx.name }}
<template>
</template>
</ContextMenu>
That's all I think.
close() closes the menuopen() without passing an event to open the menu at last position (defaults to 0,0)FAQs
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Research
Destructive malware is rising across open source registries, using delays and kill switches to wipe code, break builds, and disrupt CI/CD.

Security News
Socket CTO Ahmad Nassri shares practical AI coding techniques, tools, and team workflows, plus what still feels noisy and why shipping remains human-led.

Research
/Security News
A five-month operation turned 27 npm packages into durable hosting for browser-run lures that mimic document-sharing portals and Microsoft sign-in, targeting 25 organizations across manufacturing, industrial automation, plastics, and healthcare for credential theft.