From 536380e1902dc3d2b6fe186dc981f8b586b59d34 Mon Sep 17 00:00:00 2001 From: wangjiahao <1522128093@qq.com> Date: Mon, 3 Jun 2024 12:24:11 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=95=B0=E6=8D=AE=E5=A4=A7=E5=B1=8F):=20?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E7=BC=96=E8=BE=91=E6=97=B6=E5=85=A8=E5=B1=8F?= =?UTF-8?q?=E9=A2=84=E8=A7=88=E5=8F=AF=E4=BB=A5=E5=88=A0=E9=99=A4=E7=BB=84?= =?UTF-8?q?=E4=BB=B6=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/core-frontend/src/utils/DeShortcutKey.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/core-frontend/src/utils/DeShortcutKey.ts b/core/core-frontend/src/utils/DeShortcutKey.ts index a3465ded97..fae894ba77 100644 --- a/core/core-frontend/src/utils/DeShortcutKey.ts +++ b/core/core-frontend/src/utils/DeShortcutKey.ts @@ -11,7 +11,7 @@ const composeStore = composeStoreWithOut() const snapshotStore = snapshotStoreWithOut() const copyStore = copyStoreWithOut() const lockStore = lockStoreWithOut() -const { curComponent, isInEditor } = storeToRefs(dvMainStore) +const { curComponent, isInEditor, editMode } = storeToRefs(dvMainStore) const { areaData } = storeToRefs(composeStore) const ctrlKey = 17, @@ -101,7 +101,7 @@ let isShiftDown = false // 全局监听按键操作并执行相应命令 export function listenGlobalKeyDown() { window.onkeydown = e => { - if (!isInEditor || checkDialog()) return + if (!isInEditor.value || editMode.value === 'preview' || checkDialog()) return const { keyCode } = e if (positionMoveKey[keyCode] && curComponent.value) { positionMoveKey[keyCode](keyCode)