Tree: stopPropagation and preventDefault for node-contextmenu if bound (#10123)

This commit is contained in:
FuryBean
2018-03-14 15:16:52 +08:00
committed by 杨奕
parent 5797325c73
commit 0c8523bce9

View File

@@ -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);
},