diff --git a/frontend/src/components/canvas/components/Editor/index.vue b/frontend/src/components/canvas/components/Editor/index.vue index 43417422d3..a56ec4bd6c 100644 --- a/frontend/src/components/canvas/components/Editor/index.vue +++ b/frontend/src/components/canvas/components/Editor/index.vue @@ -813,6 +813,10 @@ export default { y: 18 } } + }, + scrollTop: { + type: Number, + default: 0 } }, data() { @@ -1251,9 +1255,8 @@ export default { } }, handleDragOver(e) { - // console.log('handleDragOver-Editor') this.dragComponentInfo.shadowStyle.x = e.pageX - 220 - this.dragComponentInfo.shadowStyle.y = e.pageY - 90 + this.dragComponentInfo.shadowStyle.y = e.pageY - 90 + this.scrollTop this.dragComponentInfo.style.left = this.dragComponentInfo.shadowStyle.x / this.scalePointWidth this.dragComponentInfo.style.top = this.dragComponentInfo.shadowStyle.y / this.scalePointHeight if (this.dragComponentInfo.auxiliaryMatrix) { diff --git a/frontend/src/views/panel/edit/index.vue b/frontend/src/views/panel/edit/index.vue index dfd7316478..c25f8668e7 100644 --- a/frontend/src/views/panel/edit/index.vue +++ b/frontend/src/views/panel/edit/index.vue @@ -106,7 +106,7 @@ @mouseup="deselectCurComponent" @scroll="canvasScroll" > - + @@ -126,7 +126,7 @@ id="canvasInfoMobile" class="this_mobile_canvas_main" > - +