Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
@ektx/v-contextmenu
Advanced tools
右键菜单功能
yarn add @ektx/v-contextmenu
请先确保你有使用 vuex
import VContextmenu from '@ektx/v-contextmenu/store'
const store = new Vuex.Store({
modules: { VContextmenu }
})
<template>
<main>
<!-- 绑定事件 -->
<div @contextmenu.prevent="rightClick"></div>
<!-- 引用 HTML 结构 -->
<VContextmenus />
</main>
</template>
<script>
// 引入
import VContextmenus from '@ektx/v-contextmenus'
export default {
components: {
VContextmenus
},
data () {
return {
// 菜单内容
menu: {
data: [
{
title: 'v-contenxtmenus',
classes: 'hello',
evt (data) {
alert('Welcome Use v-contenxtmenus!')
}
},
{
title: '联系方式',
children: [
{
title: 'ektx1989@gmail.com'
},
{
title: '@宅龙猫'
}
]
},
{
type: 'separator'
},
{
title: 'Github.com',
evt () {
}
},
{
type: 'separator'
},
{
disabled: true,
title: 'v 0.1.0'
}
]
}
}
},
methods: {
// 自定义事件
rightClick (evt) {
this.$store.commit('setContextmenu', {
data: this.menu, evt
})
}
}
}
</script>
store.commit('setContextmenu', {data, evt})
@data 菜单内容 @evt 鼠标事件
store.commit('setContextmenu', { show: false })
FAQs
Vue 右键菜单功能
We found that @ektx/v-contextmenu demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
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
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.