mirror of
https://github.com/ElemeFE/element.git
synced 2025-12-19 12:04:02 +08:00
Tree: stopPropagation and preventDefault for node-contextmenu if bound (#10123)
This commit is contained in:
@@ -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);
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user