mirror of
https://github.com/dataease/dataease.git
synced 2025-02-25 03:52:59 +08:00
fix: 修复大屏复制占位、表格快速隐藏显示切换未渲染问题、Mac录屏操作与大屏快捷键冲突问题
This commit is contained in:
parent
f0612c6896
commit
0df7211d40
@ -221,12 +221,15 @@ const handleContextMenu = e => {
|
|||||||
areaData.components.includes(getComponent(index))
|
areaData.components.includes(getComponent(index))
|
||||||
}"
|
}"
|
||||||
@click="onClick($event, transformIndex(index))"
|
@click="onClick($event, transformIndex(index))"
|
||||||
@dblclick="editComponentName(getComponent(index))"
|
|
||||||
>
|
>
|
||||||
<el-icon class="component-icon">
|
<el-icon class="component-icon">
|
||||||
<Icon :name="getIconName(getComponent(index))"></Icon>
|
<Icon :name="getIconName(getComponent(index))"></Icon>
|
||||||
</el-icon>
|
</el-icon>
|
||||||
<span :id="`component-label-${getComponent(index)?.id}`" class="component-label">
|
<span
|
||||||
|
:id="`component-label-${getComponent(index)?.id}`"
|
||||||
|
class="component-label"
|
||||||
|
@dblclick="editComponentName(getComponent(index))"
|
||||||
|
>
|
||||||
{{ getComponent(index)?.name }}
|
{{ getComponent(index)?.name }}
|
||||||
</span>
|
</span>
|
||||||
<div
|
<div
|
||||||
|
@ -107,8 +107,10 @@ export const copyStore = defineStore('copy', {
|
|||||||
eventBus.emit('addDashboardItem-' + newComponent.canvasId, newComponent)
|
eventBus.emit('addDashboardItem-' + newComponent.canvasId, newComponent)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
if (dvInfo.value.type === 'dashboard') {
|
||||||
//占位优化 整合定位
|
//占位优化 整合定位
|
||||||
eventBus.emit('doCanvasInit-canvas-main')
|
eventBus.emit('doCanvasInit-canvas-main')
|
||||||
|
}
|
||||||
snapshotStore.recordSnapshotCache()
|
snapshotStore.recordSnapshotCache()
|
||||||
},
|
},
|
||||||
cut() {
|
cut() {
|
||||||
|
@ -2,6 +2,7 @@ import { defineStore, storeToRefs } from 'pinia'
|
|||||||
import { store } from '../../index'
|
import { store } from '../../index'
|
||||||
import { dvMainStoreWithOut } from './dvMain'
|
import { dvMainStoreWithOut } from './dvMain'
|
||||||
import { swap } from '@/utils/utils'
|
import { swap } from '@/utils/utils'
|
||||||
|
import { useEmitt } from '@/hooks/web/useEmitt'
|
||||||
|
|
||||||
const dvMainStore = dvMainStoreWithOut()
|
const dvMainStore = dvMainStoreWithOut()
|
||||||
const { componentData, curComponentIndex, curComponent } = storeToRefs(dvMainStore)
|
const { componentData, curComponentIndex, curComponent } = storeToRefs(dvMainStore)
|
||||||
@ -52,6 +53,11 @@ export const layerStore = defineStore('layer', {
|
|||||||
// 显示
|
// 显示
|
||||||
if (curComponent && curComponent.value) {
|
if (curComponent && curComponent.value) {
|
||||||
curComponent.value.isShow = true
|
curComponent.value.isShow = true
|
||||||
|
if (curComponent.value.innerType.indexOf('table') !== -1) {
|
||||||
|
setTimeout(() => {
|
||||||
|
useEmitt().emitter.emit('renderChart-' + curComponent.value.id)
|
||||||
|
}, 400)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -97,19 +97,24 @@ const checkDialog = () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let isCtrlOrCommandDown = false
|
let isCtrlOrCommandDown = false
|
||||||
|
let isShiftDown = false
|
||||||
// 全局监听按键操作并执行相应命令
|
// 全局监听按键操作并执行相应命令
|
||||||
export function listenGlobalKeyDown() {
|
export function listenGlobalKeyDown() {
|
||||||
window.onkeydown = e => {
|
window.onkeydown = e => {
|
||||||
|
console.log('e.keyCode-down=' + e.keyCode)
|
||||||
if (!isInEditor || checkDialog()) return
|
if (!isInEditor || checkDialog()) return
|
||||||
const { keyCode } = e
|
const { keyCode } = e
|
||||||
if (positionMoveKey[keyCode] && curComponent.value) {
|
if (positionMoveKey[keyCode] && curComponent.value) {
|
||||||
positionMoveKey[keyCode](keyCode)
|
positionMoveKey[keyCode](keyCode)
|
||||||
e.preventDefault()
|
e.preventDefault()
|
||||||
} else if (keyCode === shiftKey) {
|
} else if (keyCode === shiftKey) {
|
||||||
|
isShiftDown = true
|
||||||
composeStore.setIsShiftDownStatus(true)
|
composeStore.setIsShiftDownStatus(true)
|
||||||
|
releaseKeyCheck()
|
||||||
} else if (keyCode === ctrlKey || keyCode === commandKey) {
|
} else if (keyCode === ctrlKey || keyCode === commandKey) {
|
||||||
isCtrlOrCommandDown = true
|
isCtrlOrCommandDown = true
|
||||||
composeStore.setIsCtrlOrCmdDownStatus(true)
|
composeStore.setIsCtrlOrCmdDownStatus(true)
|
||||||
|
releaseKeyCheck()
|
||||||
} else if ((keyCode == deleteKey || keyCode == macDeleteKey) && curComponent.value) {
|
} else if ((keyCode == deleteKey || keyCode == macDeleteKey) && curComponent.value) {
|
||||||
deleteComponent()
|
deleteComponent()
|
||||||
} else if (isCtrlOrCommandDown) {
|
} else if (isCtrlOrCommandDown) {
|
||||||
@ -124,10 +129,12 @@ export function listenGlobalKeyDown() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
window.onkeyup = e => {
|
window.onkeyup = e => {
|
||||||
|
console.log('e.keyCode=' + e.keyCode)
|
||||||
if (e.keyCode === ctrlKey || e.keyCode === commandKey) {
|
if (e.keyCode === ctrlKey || e.keyCode === commandKey) {
|
||||||
isCtrlOrCommandDown = false
|
isCtrlOrCommandDown = false
|
||||||
composeStore.setIsCtrlOrCmdDownStatus(false)
|
composeStore.setIsCtrlOrCmdDownStatus(false)
|
||||||
} else if (e.keyCode === shiftKey) {
|
} else if (e.keyCode === shiftKey) {
|
||||||
|
isShiftDown = true
|
||||||
composeStore.setIsShiftDownStatus(false)
|
composeStore.setIsShiftDownStatus(false)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -137,6 +144,16 @@ export function listenGlobalKeyDown() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//当前不支持同时ctrl + shift操作
|
||||||
|
function releaseKeyCheck() {
|
||||||
|
if (isCtrlOrCommandDown && isShiftDown) {
|
||||||
|
isCtrlOrCommandDown = false
|
||||||
|
composeStore.setIsCtrlOrCmdDownStatus(false)
|
||||||
|
isShiftDown = true
|
||||||
|
composeStore.setIsShiftDownStatus(false)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function copy() {
|
function copy() {
|
||||||
copyStore.copy()
|
copyStore.copy()
|
||||||
}
|
}
|
||||||
|
@ -453,8 +453,9 @@ onMounted(() => {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
initTitle()
|
initTitle()
|
||||||
|
const viewInfo = val ? val : view.value
|
||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
chartComponent?.value?.renderChart(val)
|
chartComponent?.value?.renderChart(viewInfo)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
Loading…
Reference in New Issue
Block a user