Feat: [前台]:新增事件处理工具函数,阻止事件冒泡

This commit is contained in:
fanxb 2019-07-26 11:25:45 +08:00
parent 89e08c569e
commit a576267a77

View File

@ -0,0 +1,11 @@
/**
* 阻止原生/合成事件冒泡
* @param {*} e
*/
export function stopTransfer(e) {
if (e.domEvent) {
e = e.domEvent;
}
e.nativeEvent.stopImmediatePropagation();
e.stopPropagation();
}