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

v-contextmenu

v2.9.2

Published

ContextMenu based on Vue 2.0

Downloads

10,939

Readme

v-contextmenu

NPM version NPM download NPM version License Node version

NPM

适用于 Vue 2.0 的 ContextMenu 组件。

中文 | English

安装

CDN 引入

可通过 unpkg.com/v-contextmenu@2 获取最新版本的资源,在页面中引入相应 js 和 css 文件即可。

<!-- 引入 Vue2 -->
<script src="https://unpkg.com/vue@2/dist/vue.js"></script>

<!-- 引入 VContextmenu 组件 -->
<script src="https://unpkg.com/v-contextmenu@2/dist/index.js"></script>

<!-- 引入 VContextmenu 组件样式 -->
<link rel="stylesheet" href="https://unpkg.com/v-contextmenu@2/dist/index.css">

建议使用 NPM 安装

NPM 安装

$ npm i -S v-contextmenu@2 # yarn add v-contextmenu@2

概览

概览

访问在线示例查看在线示例 GIF

使用

一个简单的例子

import contentmenu from 'v-contextmenu'
import 'v-contextmenu/dist/index.css'

Vue.use(contentmenu)
<template>
  <v-contextmenu ref="contextmenu">
    <v-contextmenu-item>菜单1</v-contextmenu-item>
    <v-contextmenu-item>菜单2</v-contextmenu-item>
    <v-contextmenu-item>菜单3</v-contextmenu-item>
  </v-contextmenu>

  <div v-contextmenu:contextmenu>右键点击此区域</div>
</template>

详细使用方法见 文档 & 例子

如果你需要单独引入组件使用,请查看单独引用

主题

提供三种主题,使用方法见 VContextmenu

默认

default

亮色

bright

暗色

dark

开发

$ npm install
$ npm run dev

构建

$ npm run build:package # 构建 npm 包
$ npm run build:example # 构建示例站点
$ npm run build # build:package & build:example

更新日志

详见 releases