From 8bc1f5889ef51489eb51006fee5446691c8518fd Mon Sep 17 00:00:00 2001 From: wangjiahao <1522128093@qq.com> Date: Thu, 10 Oct 2024 14:34:46 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=95=B0=E6=8D=AE=E5=A4=A7=E5=B1=8F):=20?= =?UTF-8?q?=E4=BF=AE=E5=A4=8Dtab=E3=80=81=E5=88=86=E7=BB=84=E7=BB=84?= =?UTF-8?q?=E4=BB=B6=E5=86=85=E7=BB=84=E4=BB=B6=E5=9C=A8=E5=9D=90=E6=A0=87?= =?UTF-8?q?=E7=B3=BB=E9=87=8C=E7=9A=84=E5=AE=9A=E4=BD=8D=E4=B8=8D=E6=AD=A3?= =?UTF-8?q?=E7=A1=AE=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/custom-component/common/DeRuler.vue | 20 +++++-------------- 1 file changed, 5 insertions(+), 15 deletions(-) diff --git a/core/core-frontend/src/custom-component/common/DeRuler.vue b/core/core-frontend/src/custom-component/common/DeRuler.vue index 8316f93ac9..0022151e0f 100644 --- a/core/core-frontend/src/custom-component/common/DeRuler.vue +++ b/core/core-frontend/src/custom-component/common/DeRuler.vue @@ -27,30 +27,20 @@ const rulerSize = computed(() => props.direction === 'horizontal' ? canvasStyleData.value.width : canvasStyleData.value.height ) -const curComponentSize = computed(() => { - if (curComponent.value) { - return ( - ((props.direction === 'horizontal' - ? curComponent.value.style.width - : curComponent.value.style.height) * - canvasStyleData.value.scale) / - 100 - ) - } else { - return 0 - } -}) - // 计算复合画布内部组件偏移量 const parentStyle = computed(() => { const style = { left: 0, top: 0 } if (curComponent.value && curComponent.value.canvasId !== 'canvas-main') { componentData.value.forEach(item => { - if (curComponent.value.canvasId.index(item.id) > -1) { + if (curComponent.value.canvasId.indexOf(item.id) > -1) { style.left = item.style.left style.top = item.style.top } }) + // tab页头部偏移量 + if (curComponent.value.canvasId.indexOf('Group') === -1) { + style.top = style.top + 56 + } } return style })