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.
self-right-menus
Advanced tools
一个自定义的右键无限层级菜单指令
插件安装 yarn add self-right-menus
npm install self-right-menus --save
插件使用
在项目的入口文件main.ts/main.js中加入下述代码
import rightMenus from "self-right-menus"
Vue.use(rightMenus);
在你的业务代码中,在元素上绑定v-right-menu,然后传对应的参数即可.
属性 | 说明 | 类型 | 默认值 |
---|---|---|---|
width | 右键菜单宽度 | Number | 166 |
content | 右键菜单内容数组对象 | Array | 必传 |
children | 子集菜单对象,有这个对象代表含有子集菜单项 | Object | 非必传 |
属性 | 说明 | 类型 | 默认值 |
---|---|---|---|
label | 菜单名称 | String | 必传 |
handler | 菜单操作方法 | Function | 非必传 |
disabled | 菜单是否禁用 | Boolean | false |
berak | 菜单分割线位置(默认三个为一组分割) | Boolean | false |
属性 | 说明 | 类型 | 默认值 |
---|---|---|---|
width | 右键菜单宽度 | Number | 166 |
content | 右键菜单内容数组对象 | Array | 必传 |
children | 子集菜单对象,有这个对象代表含有子集菜单项 | Object | 非必传 |
<template>
<div
v-right-menu="rightMenus"
>
</div>
</template>
<script>
export default {
data(){
return {
rightMenus:{
width:190,//右键菜单宽度 ;默认值166
content:[
{
label:'复制',//右键菜单子项名称 (必需值)
handler:this.copy,//右键菜单子项方法(可选值)
disabled:boolean,//子项是否禁用(可选值)
break:boolean,//子项分割线标准(不给值默认3个为一组分割)
children:{
width:180,
content:[{
label:'复制',//右键菜单子项名称 (必需值)
handler:this.copy,//右键菜单子项方法(可选值)
disabled:boolean,//子项是否禁用(可选值)
break:boolean,//子项分割线标准(不给值默认3个为一组分割)
}]
}
}
]
}
}
},
methods:{
copy(){
}
}
}
}
</script>
FAQs
这是一个基于Vue的自定义右键无限层级菜单项目
The npm package self-right-menus receives a total of 0 weekly downloads. As such, self-right-menus popularity was classified as not popular.
We found that self-right-menus 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.