fix(数据大屏): 修复编辑时全屏预览可以删除组件问题

This commit is contained in:
wangjiahao 2024-06-03 12:24:11 +08:00
parent 88d6543dec
commit 536380e190

View File

@ -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)