- 全栈开发一枚
- 热爱编程, 拥抱开源
- 热衷跨平台开发
- 热衷桌面端开发
hunlongyu / vue3-contextmenu Goto Github PK
View Code? Open in Web Editor NEWvue3 contextmenu. vue3 右键菜单
License: MIT License
vue3 contextmenu. vue3 右键菜单
License: MIT License
vue 升级到 3.2.19版本后,报错!
"TypeError: Cannot read property 'type' of null"
感谢大牛开源 ~~ 给您拜个早年~~
有个情景,假设表格有10行数据,每行一个ContextMenu 触发点。
需求是:触发ContextMenu时传递id给菜单
<context-menu>
<context-menu-item @click="deleteById($context.id)" :divider="true">
<span>Delete Row By Id: {{ $context.id }}</span>
</context-menu-item>
</context-menu>
<div v-contextmenu="{id: '123456789'}">
data
</div>
不知是否可以百忙之中抽空实现一下?
NPM 上 0.2.5 版本的代码没有注入emitContext
相关的逻辑。
很不幸 vue 升级到3.0.11后报错了!
在某个子组件下使用
<context-menu ref="context"> <context-menu-item @click="refresh" :divider="true">刷新</context-menu-item> <context-menu-item @itemClickHandle="itemClickEvent" :divider="true">停止</context-menu-item> </context-menu>
会出现Failed to resolve component: contextmenu,并且是直接呈现在页面上·不会右键才出现
只能在App.vue使用??
请问event事件获取innerText如何操作?
<li v-contextmenu="{ name: 'context-menu-2', id: event.target.innerText }">ItemName</li>
以上代码无效
举个例子:
<a-row :gutter="[10, 10]" style="margin-top:20px" v-contextmenu="{ name: 'boxmenu' }">
<a-col :span="4" v-for="info in state.showfiles" style="z-index:999999"
v-contextmenu="{ name: 'dirmenu', info: info }">
.......
</a-col>
</a-row>
下面的dirmenu就是去效果 显示的还是boxmenu
你好,我在使用vue3.0+element-plus中遇到TypeError: Cannot read properties of null (reading 'isCE');请问这么怎么处理啊
'itemClickHandele' should be 'itemClickHandle'.
现在一个页面,只能注册一个菜单
<Contextmenu menuId="1">
</Contextmenu>
<Contextmenu menuId="2">
</Contextmenu>
<div v-contextmenu="1"></div>
<div v-contextmenu="2"></div>
缺少.d.ts声明文件,项目中引入之后报错
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.