From bcbd1d3ce683cb7700fa50fd84c71011f1cf0bb7 Mon Sep 17 00:00:00 2001 From: wangjiahao <1522128093@qq.com> Date: Sun, 4 Feb 2024 14:07:57 +0800 Subject: [PATCH] =?UTF-8?q?refactor(=E4=BB=AA=E8=A1=A8=E6=9D=BF):=20?= =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=82=AC=E6=B5=AE=E7=BB=84=E4=BB=B6=E7=A7=BB?= =?UTF-8?q?=E5=85=A5=E7=A7=BB=E9=99=A4Tab=E6=A0=B7=E5=BC=8F=EF=BC=8C?= =?UTF-8?q?=E4=BF=9D=E6=8C=81=E7=A7=BB=E5=85=A5=E7=BB=84=E4=BB=B6=E5=AE=BD?= =?UTF-8?q?=E9=AB=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/frontend/src/components/deDrag/index.vue | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/core/frontend/src/components/deDrag/index.vue b/core/frontend/src/components/deDrag/index.vue index 6b55c8f8c9..7feff61116 100644 --- a/core/frontend/src/components/deDrag/index.vue +++ b/core/frontend/src/components/deDrag/index.vue @@ -1538,6 +1538,7 @@ export default { // Tab内部的画布ID 为 tab组件id + '-' + tabActiveName const targetCanvasId = this.tabMoveInActiveId + '-' + this.tabActiveTabNameMap[this.tabMoveInActiveId] const targetCanvasScale = this.curCanvasScaleMap[targetCanvasId] + const targetMainCanvasScale = this.curCanvasScaleMap['canvas-main'] if (this.element.auxiliaryMatrix) { this.element.x = 1 this.element.y = 108 @@ -1548,8 +1549,12 @@ export default { this.element.style.left = 0 this.element.style.top = (this.element.y - 1) * targetCanvasScale.matrixStyleOriginHeight } else { - this.element.style.left = 0 - this.element.style.top = 0 + this.element.style.left = 10 + this.element.style.top = 10 + const newWidth = this.element.style.width * targetMainCanvasScale.scalePointWidth / targetCanvasScale.scalePointWidth + const checkWidth = this.canvasStyleData.width - 30 + this.element.style.width = newWidth < checkWidth ? newWidth : checkWidth + this.element.style.height = this.element.style.height * targetMainCanvasScale.scalePointHeight / targetCanvasScale.scalePointHeight } this.element.canvasId = targetCanvasId }