npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

rmenu

v1.0.3

Published

此组件为 rmenu 组件,基于vue封装的右键菜单组件,目前已上传npm和git,可直接安装/下载使用。 如有其他需求,请联系作者进行扩展和修改。 -----------------------------------------------------------------------------

Downloads

4

Readme

此组件为 rmenu 组件,基于vue封装的右键菜单组件,目前已上传npm和git,可直接安装/下载使用。 如有其他需求,请联系作者进行扩展和修改。

1.安装

npm i rmenu

2.用法

main.js 中进行导入和使用:

import rMenu from 'rmenu'  
Vue.use(rMenu);  

App.vue 对应页面中,直接使用,方式如下:

<r-menu
	:liClick="rMenuClick"
	ref="rMenu"
	>
</r-menu>

3.参数说明

|参数|类型|是否必须|默认值|说明| |:---|:---|:---|:---|:---| |liClick|Function|否|无|菜单点击回调方法| |ref|String|否|无|指定组件名称,方便在需要的时候调用树组件暴露的API方法|

4.回调说明

a.菜单点击回调方法

liClick(菜单li对象) // 组件会返回点击的菜单项,使用者需自行开发点击后的事件处理

5.数据源

|参数|类型|是否必须|默认值|说明| |:---|:---|:---|:---|:---| |x|Number|是|无|菜单left| |y|Number|是|无|菜单top| |data|Array|是|无|菜单对象数组[{option:'操作区分', optionName:'显示的操作名' }]|

6.API

调用API的方法
this.$refs.组件名称.API方法名(参数1,参数2...)

a.打开菜单 openMenu

参数

Object: { x:0, y:0, data: [] }

返回

例:

this.$refs.rMenu.openMenu({
	y:100,
	x:100,
	data:[{
			optionName:"全部展开",
			option:'expand'
		},{
			optionName:"全部收起",
			option:'close'
		}
	]
})

b.关闭右键菜单 closeMenu

参数

返回