mirror of https://github.com/ElemeFE/element
Tree: stopPropagation and preventDefault for node-contextmenu if bound (#10123)
parent
5797325c73
commit
0c8523bce9
|
@ -165,6 +165,10 @@
|
|||
},
|
||||
|
||||
handleContextMenu(event) {
|
||||
if (this.tree._events['node-contextmenu'] && this.tree._events['node-contextmenu'].length > 0) {
|
||||
event.stopPropagation();
|
||||
event.preventDefault();
|
||||
}
|
||||
this.tree.$emit('node-contextmenu', event, this.node.data, this.node, this);
|
||||
},
|
||||
|
||||
|
|
Loading…
Reference in New Issue