当前位置:网站首页>[example] v-contextmenu right click menu component
[example] v-contextmenu right click menu component
2022-07-24 09:29:00 【viceen】
【 example 】v-contextmenu Right click menu components
effect

Security package
cnpm i v-contextmenu -S
main.js
import contentmenu from 'v-contextmenu'
import 'v-contextmenu/dist/index.css'
Vue.use(contentmenu)
Submenu.vue
<template>
<div class="example">
<v-contextmenu ref="contextmenu" :theme="theme">
<v-contextmenu-item @click="handleClick"> menu 1</v-contextmenu-item>
<v-contextmenu-item @click="handleClick"> menu 2</v-contextmenu-item>
<v-contextmenu-item divider></v-contextmenu-item>
<v-contextmenu-submenu @submenu-show="handleSubmenuShow" title=" Sub menu ">
<v-contextmenu-item @click="handleClick"> menu 3</v-contextmenu-item>
<v-contextmenu-item divider></v-contextmenu-item>
<v-contextmenu-submenu title=" Sub menu ">
<v-contextmenu-item @click="handleClick"> menu 5</v-contextmenu-item>
</v-contextmenu-submenu>
<v-contextmenu-item @click="handleClick"> menu 4</v-contextmenu-item>
<v-contextmenu-item :auto-hide="false"> Don't turn off automatically 1</v-contextmenu-item>
<v-contextmenu-item :auto-hide="false"> Don't turn off automatically 2</v-contextmenu-item>
</v-contextmenu-submenu>
</v-contextmenu>
<div :class="['box', theme]" v-contextmenu:contextmenu>
Right click this area
</div>
</div>
</template>
<script>
export default {
name: 'Submenu',
props: {
theme: String,
},
methods: {
handleClick (vm, event) {
console.log(vm, event)
},
handleSubmenuShow (vm, placement) {
console.log(vm, placement)
},
},
}
</script>
<style scoped>
.box {
width: 100%;
}
</style>
边栏推荐
- How to improve office efficiency through online collaborative documents
- Detailed LinkedList
- How to open the port number of the server, and the corresponding port of common network services
- Common evaluation indexes of medical image segmentation
- [don't bother with reinforcement learning] video notes (I) 2. Summary of reinforcement learning methods
- Basic knowledge of PHP - complete collection of PHP functions
- Replace the function of pow with two-dimensional array (solve the time overrun caused by POW)
- Six pictures show you why TCP shakes three times?
- Ue5 film and television animation rendering MRQ layered learning notes
- TiFlash 源码阅读(五) DeltaTree 存储引擎设计及实现分析 - Part 2
猜你喜欢
![[don't bother with reinforcement learning] video notes (I) 3. Why use reinforcement learning?](/img/57/0ebff0839d2a2898472d3270fd13df.png)
[don't bother with reinforcement learning] video notes (I) 3. Why use reinforcement learning?

Detailed LinkedList

来阿里一年后我迎来了第一次工作变动....

js定位大全获取节点的兄弟,父级,子级元素含robot实例

MySQL基础篇(一)-- SQL基础

Open source summer interview | learn with problems, Apache dolphin scheduler, Wang Fuzheng

Tiktok's "online celebrity" was poached by Amazon and broadcast on Amazon live platform
![[don't bother with intensive learning] video notes (III) 1. What is SARS?](/img/5c/4636db2849ba8514976a5afaf56e38.png)
[don't bother with intensive learning] video notes (III) 1. What is SARS?

Android system security - 5.3-apk V2 signature introduction

Account 1-2
随机推荐
Little dolphin "transformed" into a new intelligent scheduling engine, which can be explained in simple terms in the practical development and application of DDS
Linked list - 24. Exchange nodes in the linked list in pairs
Will your NFT disappear? Dfinity provides the best solution for NFT storage
Racecar multi-point navigation experiment based on ROS communication mechanism
[don't bother to strengthen learning] video notes (II) 2. Write a small example of Q learning
Aruba学习笔记06-无线控制AC基础配置(CLI)
How to judge and analyze NFT market briefly through NFT go?
数据中台:始于阿里,兴于DaaS
Cess test online line! The first decentralized storage network to provide multiple application scenarios
DSP development, using CCS software to establish engineering and burning
Makefile variables and dynamic library static library
Open source summer interview | learn with problems, Apache dolphin scheduler, Wang Fuzheng
Introduction to common ansible modules
Leetcode question brushing series -- 174. Dungeon games
Six pictures show you why TCP shakes three times?
JS locate Daquan to get the brother, parent and child elements of the node, including robot instances
DP longest common subsequence detailed version (LCS)
How to open the port number of the server, and the corresponding port of common network services
Re6: reading paper licin: a heterogeneous graph based approach for automatic legal stat identification fro
Wenxin big model raises a new "sail", and the tide of industrial application has arrived