Comments (13)
@jwencode 在这个例子中可以看到,看 console
里。
例子代码在 https://github.com/snokier/v-contextmenu/blob/master/examples/Multiple.vue#L9
from v-contextmenu.
<span v-contextmenu:contextmenu :myParams="{ a: 1 }" value='233'>aaa</span>
<span v-contextmenu:contextmenu :myParams="{ b: 2 }" value='666'>bbb</span>
<v-contextmenu ref="contextmenu" theme="bright" @contextmenu="test" @show="showContextMenu"></v-contextmenu>
test (vm) {
console.log(vm.data.attrs.myParams) // { a: 1 }
console.log(vm.data.attrs.value) // 233
}
from v-contextmenu.
我也需要这个功能,获取点击的数据。可否加一个传参的功能。
from v-contextmenu.
#46 VContextmenu
组件上有个 contextmenu
事件,参数是触发 contextmenu 事件区域的 vnode
,应该满足你们的需求
https://github.com/snokier/v-contextmenu/blob/master/docs/usage.md#vcontextmenu
from v-contextmenu.
根据你说的,我看了vnode,但是在事件中无法获取到vnode的参数,可以给出参考案例吗?感谢
from v-contextmenu.
vnode 只能获取节点 dom 元素啊
from v-contextmenu.
vnode 只能获取节点 dom 元素啊
可以加一个@contextmenu事件 右键点击事件 传递对象 然后间接操作
from v-contextmenu.
@contextmenu在v-contextmenu的事件后触发,想禁用容器下的某个子节点的菜单触发。
from v-contextmenu.
弹出的里面@contextmenu回调加什么 怎么加?我是公用的右键 想根据数据判断
from v-contextmenu.
如图, element tree组件,鼠标右键点击某个tree节点,先执行treeRightClick(),拿到node,给this.current_tree_node。然后操作就好了
from v-contextmenu.
在新的 3.1.1 版本中没有 contextmenu 事件,此功能需要如何实现?
from v-contextmenu.
v-contextmenu
这个可以用吗?我测试的 test 函数的参数是空的,vm是undefined呀。
from v-contextmenu.
最新的测试如下:
如果指定v-contextmenu:contextmenu的容器上添加 @contextmenu 事件,其event参数有个问题,有时候是子节点,不能保证是此容器。
如果是menu本身添加 @contextmenu ,完全不起作用。
from v-contextmenu.
Related Issues (20)
- 引用报错 Error in directive contextmenu bind hook HOT 2
- 没有找到 menu 对应的实例 HOT 1
- Firefox complains about mozPressure
- How to access the element under the contextmenu?
- Cannot override the v-contextmenu class style HOT 1
- 【需求】当 v-context-menu 的 overflow 属性为 scroll 时,sub-menu 是否可能使用 transform 来定位而不是相对定位来展示? HOT 1
- How to add icon before menu entries HOT 1
- no typescript support HOT 2
- JSX element type 'VContextmenu' does not have any construct or call signatures HOT 1
- 如何在SFC中使用this.$contextmenu?
- 在线网页示例失效 HOT 1
- 组件注册失败
- 希望可以自定义VContextmenuSubmenu的插槽内容
- [bug] 使用 show 方法显示菜单,超出屏幕时不能自动适配
- 多个引用的时候,一直点击右键会出现多个
- Documentation Error Please fix HOT 1
- @hide 无法触发
- Hi guys, can anyone tell me how to use this plugin with nuxt 3
- 3.1版本依赖包dist目录缺失themes目录导致样式加载异常
- Vue2 版本的 v-contextmenu 存在内存泄漏问题 HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from v-contextmenu.