forked from github/dataease
* fix: 修复使用快捷键反复切换桌面应用导致的数据大屏组件移动失效问题
Pr@dev v2@fix app switch
This commit is contained in:
commit
014c5c5b83
@ -1,6 +1,11 @@
|
||||
<template>
|
||||
<div class="pic-main">
|
||||
<img v-if="propValue['url']" :style="imageAdapter" :src="imgUrlTrans(propValue['url'])" />
|
||||
<img
|
||||
draggable="false"
|
||||
v-if="propValue['url']"
|
||||
:style="imageAdapter"
|
||||
:src="imgUrlTrans(propValue['url'])"
|
||||
/>
|
||||
<div v-else class="pic-upload">
|
||||
<span
|
||||
><el-button @click="uploadImg" text style="color: #646a73" icon="Plus"
|
||||
|
@ -142,6 +142,13 @@ export function listenGlobalKeyDown() {
|
||||
}
|
||||
}
|
||||
|
||||
export function releaseAttachKey() {
|
||||
isCtrlOrCommandDown = false
|
||||
composeStore.setIsCtrlOrCmdDownStatus(false)
|
||||
isShiftDown = false
|
||||
composeStore.setIsShiftDownStatus(false)
|
||||
}
|
||||
|
||||
//当前不支持同时ctrl + shift操作
|
||||
function releaseKeyCheck() {
|
||||
if (isCtrlOrCommandDown && isShiftDown) {
|
||||
|
@ -19,7 +19,7 @@ import { getDatasetTree } from '@/api/dataset'
|
||||
import { Tree } from '@/views/visualized/data/dataset/form/CreatDsGroup.vue'
|
||||
import { findDragComponent, findNewComponent, initCanvasData } from '@/utils/canvasUtils'
|
||||
import CanvasCore from '@/components/data-visualization/canvas/CanvasCore.vue'
|
||||
import { listenGlobalKeyDown } from '@/utils/DeShortcutKey'
|
||||
import { listenGlobalKeyDown, releaseAttachKey } from '@/utils/DeShortcutKey'
|
||||
import { adaptCurThemeCommonStyle } from '@/utils/canvasStyle'
|
||||
import { changeComponentSizeWithScale } from '@/utils/changeComponentsSizeWithScale'
|
||||
import { useEmitt } from '@/hooks/web/useEmitt'
|
||||
@ -175,6 +175,7 @@ watch(
|
||||
)
|
||||
|
||||
onMounted(() => {
|
||||
window.addEventListener('blur', releaseAttachKey)
|
||||
if (editMode.value === 'edit') {
|
||||
window.addEventListener('storage', eventCheck)
|
||||
}
|
||||
@ -224,6 +225,7 @@ onMounted(() => {
|
||||
|
||||
onUnmounted(() => {
|
||||
window.removeEventListener('storage', eventCheck)
|
||||
window.removeEventListener('blur', releaseAttachKey)
|
||||
})
|
||||
|
||||
const previewStatus = computed(() => editMode.value === 'preview')
|
||||
|
Loading…
Reference in New Issue
Block a user