Match-id-315cebc9891bb15a1e6cf5d419fd71f880796f3a

This commit is contained in:
* 2023-05-25 09:40:45 +08:00
parent 5ad4f734c3
commit 43023ca26a
8 changed files with 20 additions and 23 deletions

View File

@ -16,7 +16,7 @@
// 需要委托的horizon事件和原生事件对应关系
export const allDelegatedHorizonEvents = new Map();
// 模拟委托事件,事件本事不冒泡,需要其他事件来触发冒泡过程
// 模拟委托事件,不冒泡事件需要利用其他事件来触发冒泡过程
export const simulatedDelegatedEvents = ['onMouseEnter', 'onMouseLeave'];
// 所有委托的原生事件集合
export const allDelegatedNativeEvents = new Set();

View File

@ -171,8 +171,5 @@ function getParent(inst: VNode | null): VNode | null {
do {
inst = inst.parent;
} while (inst && inst.tag !== DomComponent);
if (inst) {
return inst;
}
return null;
return inst || null;
}