Skip to content

Commit 40351cd

Browse files
committed
fix: fix the component selection positioning issue.
1 parent 83f90ba commit 40351cd

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

packages/inula-dev-tools/src/injector/pickElement.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,10 @@ function onMouseMove(event: MouseEvent) {
4242
event.preventDefault();
4343
event.stopPropagation();
4444

45-
const target = (event.target as any)._inula_VNode;
45+
// const target = (event.target as any)._inula_VNode;
46+
const key = Object.keys(event.target).find(k => k.startsWith('_inula_vNode_'));
47+
const target = key ? event.target[key] : null;
48+
4649
if (target) {
4750
const id = VNodeToIdMap.get(getUserComponent(target));
4851
const vNode = queryVNode(id);

0 commit comments

Comments
 (0)