From 6c0a656558d1e5ba3120fe93ba9b2300c02389f8 Mon Sep 17 00:00:00 2001 From: kangwei Date: Thu, 13 Aug 2020 15:48:31 +0800 Subject: [PATCH] detecting --- packages/designer/src/builtin-simulator/host.ts | 17 ++++++++++------- .../src/renderer-view.tsx | 1 - 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/packages/designer/src/builtin-simulator/host.ts b/packages/designer/src/builtin-simulator/host.ts index fcd674b31..aa66044a8 100644 --- a/packages/designer/src/builtin-simulator/host.ts +++ b/packages/designer/src/builtin-simulator/host.ts @@ -364,7 +364,7 @@ export class BuiltinSimulatorHost implements ISimulatorHost void; + private disableDetecting?: () => void; /** * 设置悬停处理 */ @@ -376,7 +376,6 @@ export class BuiltinSimulatorHost implements ISimulatorHost { + this.disableDetecting = () => { detecting.leave(this.project.currentDocument); doc.removeEventListener('mouseover', hover, true); doc.removeEventListener('mouseleave', leave, false); - this.disableHovering = undefined; + this.disableDetecting = undefined; }; } @@ -445,15 +444,19 @@ export class BuiltinSimulatorHost implements ISimulatorHost { selectMode: false, triggerType: 'click', }); - console.info('menuprops', viewProps); } return createElement(getDeviceView(Component, device, designMode), viewProps, _children);