fix(仪表板、数据大屏): 修复跳转时可能出现控制台异常信息打印 (#16685)

This commit is contained in:
王嘉豪
2025-08-12 16:40:52 +08:00
committed by GitHub
parent 958516dba7
commit 01024e6a2b
3 changed files with 8 additions and 3 deletions

View File

@@ -735,8 +735,10 @@ const handleMouseDownOnPoint = (point, e) => {
}
// 获取画布位移信息
const editorRectInfo = editorMap.value[canvasId.value].getBoundingClientRect()
const editorRectInfo = editorMap.value[canvasId.value]?.getBoundingClientRect()
if (!editorRectInfo) {
reutrn
}
// 获取 point 与实际拖动基准点的差值
const pointRect = e.target.getBoundingClientRect()
// 当前点击圆点相对于画布的中心坐标

View File

@@ -225,6 +225,9 @@ export const composeStore = defineStore('compose', {
decompose() {
const canvasId = curComponent.value.canvasId
const editor = this.editorMap[canvasId]
if (!editor) {
return
}
const parentStyle = { ...curComponent.value.style }
const components = curComponent.value.propValue
const editorRect = editor.getBoundingClientRect()

View File

@@ -691,7 +691,7 @@ const canvas2Picture = (pictureData, online) => {
imgDom.style['z-index'] = '2'
imgDom.classList.add('prepare-picture-img')
imgDom.src = pictureData
mapDom.appendChild(imgDom)
mapDom?.appendChild(imgDom)
}
const preparePicture = id => {
if (id !== curView?.id) {