New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

v-contextmenu

Package Overview
Dependencies
Maintainers
1
Versions
43
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

v-contextmenu

ContextMenu based on Vue 2.0

latest
Source
npmnpm
Version
2.9.2
Version published
Weekly downloads
2.9K
4.48%
Maintainers
1
Weekly downloads
 
Created
Source

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

Keywords

vue

FAQs

Package last updated on 04 Mar 2024

Did you know?

Socket

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.

Install

Related posts