Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

github.com/Johnathan/vue-context-menu-popup

Package Overview
Dependencies
Alerts
File Explorer
Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github.com/Johnathan/vue-context-menu-popup

  • v0.0.0-20181022201653-a8b7be7f9c96
  • Source
  • Go
  • Socket score

Version published
Created
Source

vue-context-menu-popup

GitHub open issues Npm version

Usage

<ContextMenu ref="contextMenu" :menu-items="menuItems"/>

<div class="context-menu-trigger"
	@click.right.prevent="$refs.contextMenu.open($event)">
    Right Click Me!
</div>
import ContextMenu from 'vue-context-menu-popup'
import 'vue-context-menu-popup/dist/vue-context-menu-popup.css';

export default {
  data() {
    return {
        menuItems: [
        {
          label: 'First Menu Item',
        },
        {
          label: 'Disabled Menu Item',
          disabled: true,
        },
        {
          label: 'I have children',
          children: [
            {
              label: 'Child Item 1',
            },
            {
              label: 'I also have children',
              children: [
                {
                  label: 'Child Item 2',
                },
              ],
            },
          ],
        },
        ]
    }
  },
  components: {
    ContextMenu
  }
}

API

context-menu

A simple context menu component

<ContextMenu :menu-items="[....]"/>
props
  • menu-items Array (required)
data
  • visible

initial value: false

  • contextMenuPosition

initial value: [object Object]

  • openPosition

initial value: 'context-menu-open-right'

methods
  • close()

  • open(position)

    Accepts an Object with an x, y position or an instance of Event

Installation

npm install vue-context-menu-popup

Project setup

npm install

Compiles and hot-reloads for development

npm run serve

Compiles and minifies for production

npm run build

Lints and fixes files

npm run lint

Run your unit tests

npm run test:unit

Update the API section of README.md with generated documentation

npm run doc:build

FAQs

Package last updated on 22 Oct 2018

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc