diff --git a/core/core-frontend/src/components/data-visualization/RealTimeGroup.vue b/core/core-frontend/src/components/data-visualization/RealTimeGroup.vue index 481c3633d9..8bf417af8c 100644 --- a/core/core-frontend/src/components/data-visualization/RealTimeGroup.vue +++ b/core/core-frontend/src/components/data-visualization/RealTimeGroup.vue @@ -37,7 +37,7 @@ const transformIndex = index => { return componentData.value.length - 1 - index } const areaDataPush = component => { - if (component && !component.isLock && component.isShow) { + if (component && !component.isLock && component.isShow && component.canvasId === 'canvas-main') { areaData.value.components.push(component) } } diff --git a/core/core-frontend/src/components/data-visualization/RealTimeListTree.vue b/core/core-frontend/src/components/data-visualization/RealTimeListTree.vue index 654772cc68..1cfd38067a 100644 --- a/core/core-frontend/src/components/data-visualization/RealTimeListTree.vue +++ b/core/core-frontend/src/components/data-visualization/RealTimeListTree.vue @@ -30,7 +30,7 @@ const transformIndex = index => { return componentData.value.length - 1 - index } const areaDataPush = component => { - if (component && !component.isLock && component.isShow) { + if (component && !component.isLock && component.isShow && component.canvasId === 'canvas-main') { areaData.value.components.push(component) } } diff --git a/core/core-frontend/src/components/data-visualization/canvas/Shape.vue b/core/core-frontend/src/components/data-visualization/canvas/Shape.vue index a6c2234383..dcf3108462 100644 --- a/core/core-frontend/src/components/data-visualization/canvas/Shape.vue +++ b/core/core-frontend/src/components/data-visualization/canvas/Shape.vue @@ -366,7 +366,7 @@ const handleBoardMouseDownOnShape = e => { } const areaDataPush = component => { - if (component && !component.isLock && component.isShow) { + if (component && !component.isLock && component.isShow && component.canvasId === 'canvas-main') { areaData.value.components.push(component) } } diff --git a/core/core-frontend/src/utils/DeShortcutKey.ts b/core/core-frontend/src/utils/DeShortcutKey.ts index 19d4611046..665f3bbb26 100644 --- a/core/core-frontend/src/utils/DeShortcutKey.ts +++ b/core/core-frontend/src/utils/DeShortcutKey.ts @@ -109,11 +109,11 @@ export function listenGlobalKeyDown() { } else if (keyCode === shiftKey) { isShiftDown = true composeStore.setIsShiftDownStatus(true) - releaseKeyCheck() + releaseKeyCheck('shift') } else if (keyCode === ctrlKey || keyCode === commandKey) { isCtrlOrCommandDown = true composeStore.setIsCtrlOrCmdDownStatus(true) - releaseKeyCheck() + releaseKeyCheck('ctrl') } else if ((keyCode == deleteKey || keyCode == macDeleteKey) && curComponent.value) { deleteComponent() } else if (isCtrlOrCommandDown) { @@ -125,6 +125,7 @@ export function listenGlobalKeyDown() { lockMap[keyCode]() } } + console.log('1111=isCtrlOrCommandDown' + isCtrlOrCommandDown + ';isShiftDown=' + isShiftDown) } window.onkeyup = e => { @@ -150,11 +151,12 @@ export function releaseAttachKey() { } //当前不支持同时ctrl + shift操作 -function releaseKeyCheck() { - if (isCtrlOrCommandDown && isShiftDown) { +function releaseKeyCheck(keyType) { + if (keyType === 'shift' && isCtrlOrCommandDown) { isCtrlOrCommandDown = false composeStore.setIsCtrlOrCmdDownStatus(false) - isShiftDown = true + } else if (keyType === 'ctrl' && isShiftDown) { + isShiftDown = false composeStore.setIsShiftDownStatus(false) } }