Skip to content

Instantly share code, notes, and snippets.

@Akumzy
Created January 1, 2019 16:07
Show Gist options
  • Save Akumzy/44f9c7b27705ee7b181c17775bcd7333 to your computer and use it in GitHub Desktop.
Save Akumzy/44f9c7b27705ee7b181c17775bcd7333 to your computer and use it in GitHub Desktop.
How to create custom context-menu in vue
<template>
<div id="app">
<img width="25%" src="./assets/logo.png" /> <HelloWorld />
<!-- Add the component at your app root component -->
<ContextMenu />
</div>
</template>
<script>
import HelloWorld from "./components/HelloWorld";
import ContextMenu from "./partials/ContextMenu.vue";
export default {
name: "App",
components: {
HelloWorld,
ContextMenu
}
};
</script>
<style>
#app {
font-family: "Avenir", Helvetica, Arial, sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
text-align: center;
color: #2c3e50;
margin-top: 60px;
}
</style>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment