Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/Johnathan/vue-context-menu-popup
https://github.com/Johnathan/vue-context-menu-popup
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/Johnathan/vue-context-menu-popup
- Owner: Johnathan
- License: mit
- Created: 2018-09-12T19:17:09.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2018-10-22T20:17:00.000Z (over 5 years ago)
- Last Synced: 2024-03-26T06:50:40.198Z (2 months ago)
- Language: Vue
- Size: 146 KB
- Stars: 1
- Watchers: 2
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Lists
- awesome-vue - vue-context-menu-popup - Context Menu popup for Vue 2. Works on right click or can be triggered programatically. (Components & Libraries / UI Components)
- awesome-vue - vue-context-menu-popup - Context Menu popup for Vue 2. Works on right click or can be triggered programmatically. (Components & Libraries / UI Components)
- awesome-vue - vue-context-menu-popup - Context Menu popup for Vue 2. Works on right click or can be triggered programatically. (Components & Libraries / UI Components)
- awesome-vue - vue-context-menu-popup - Context Menu popup for Vue 2. Works on right click or can be triggered programatically. (Components & Libraries / UI Components)
- awesome-vue - vue-context-menu-popup - Context Menu popup for Vue 2. Works on right click or can be triggered programatically. (Components & Libraries / UI Components)
- awesome-vue - vue-context-menu-popup - Context Menu popup for Vue 2. Works on right click or can be triggered programatically. (Components & Libraries / UI Components)
- awesome-vue - vue-context-menu-popup - Context Menu popup for Vue 2. Works on right click or can be triggered programatically. (Components & Libraries / UI Components)
- awesome-vue - vue-context-menu-popup - Context Menu popup for Vue 2. Works on right click or can be triggered programatically. (Components & Libraries / UI Components)
- awesome-vue - vue-context-menu-popup - Context Menu popup for Vue 2. Works on right click or can be triggered programatically. (Components & Libraries / UI Components)
- awesome-vue - vue-context-menu-popup - Context Menu popup for Vue 2. Works on right click or can be triggered programatically. (UI Components / Form)
- awesome-vue - vue-context-menu-popup - Context Menu popup for Vue 2. Works on right click or can be triggered programatically. (UI Components / Form)
- awesome-vue - vue-context-menu-popup - Context Menu popup for Vue 2. Works on right click or can be triggered programatically. (Components & Libraries / UI Components)
- awesome-vue - vue-context-menu-popup ★0 - Context Menu popup for Vue 2. Works on right click or can be triggered programatically. (UI Components / Form)
README
# vue-context-menu-popup
[![GitHub open issues](https://img.shields.io/github/issues/Johnathan/vue-context-menu-popup.svg)](https://github.com/Johnathan/vue-context-menu-popup/issues)
[![Npm version](https://img.shields.io/npm/v/vue-context-menu-popup.svg)](https://www.npmjs.com/package/vue-context-menu-popup)## Usage
```HTML
``````javascript
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
```html
```
#### 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
```