mirror of
https://github.com/dataease/dataease.git
synced 2026-05-16 14:31:00 +08:00
fix(数据大屏): 修复Tab及tab内组件邮件菜单定位不准产生偏移问题 (#16775)
This commit is contained in:
@@ -546,8 +546,20 @@ const handleContextMenu = event => {
|
||||
const offsetY = rect.top
|
||||
|
||||
// 计算鼠标相对于最外层 div 的坐标
|
||||
const left = mouseX - offsetX
|
||||
let left = mouseX - offsetX
|
||||
let top = mouseY - offsetY
|
||||
|
||||
const curDomId = event.currentTarget?.id
|
||||
if (curDomId) {
|
||||
const curDomSplitParams = curDomId.split('-')
|
||||
if (curDomSplitParams.length > 1 && curDomSplitParams[1] !== 'canvas') {
|
||||
const tabDom = document.getElementById(`shape-id-${curDomSplitParams[1]}`)
|
||||
if (tabDom) {
|
||||
left = left + tabDom.offsetLeft
|
||||
top = top + tabDom.offsetTop
|
||||
}
|
||||
}
|
||||
}
|
||||
// 组件处于编辑状态的时候 如富文本 不弹出右键菜单
|
||||
if (!curComponent.value || (curComponent.value && !curComponent.value.editing)) {
|
||||
if (
|
||||
|
||||
Reference in New Issue
Block a user