Security News
Weekly Downloads Now Available in npm Package Search Results
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
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 | 必传 |
属性 | 说明 | 类型 | 默认值 |
---|---|---|---|
label | 菜单名称 | String | 必传 |
handler | 菜单操作方法 | Function | 非必传 |
disabled | 菜单是否禁用 | Boolean | false |
berak | 菜单分割线位置(默认三个为一组分割) | Boolean | false |
<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个为一组分割)
}
]
}
}
},
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.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
Security News
A Stanford study reveals 9.5% of engineers contribute almost nothing, costing tech $90B annually, with remote work fueling the rise of "ghost engineers."
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.