From 0d5a592e1d4f538a32948070931c8a1db0436a93 Mon Sep 17 00:00:00 2001 From: MTrun <1262327911@qq.com> Date: Sun, 10 Apr 2022 16:17:00 +0800 Subject: [PATCH] =?UTF-8?q?fix=EF=BC=9A=E4=BF=AE=E6=94=B9=E5=90=8D?= =?UTF-8?q?=E7=A7=B0=E9=94=99=E8=AF=AF=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/EditAlignLine/index.vue | 40 +++++++++---------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/src/views/chart/ContentEdit/components/EditAlignLine/index.vue b/src/views/chart/ContentEdit/components/EditAlignLine/index.vue index f2a37e5e..20491a8c 100644 --- a/src/views/chart/ContentEdit/components/EditAlignLine/index.vue +++ b/src/views/chart/ContentEdit/components/EditAlignLine/index.vue @@ -72,10 +72,10 @@ const isSorption = (selectValue: number, componentValue: number) => { // * 当前目标 const selectId = computed(() => chartEditStore.getTargetChart.selectId) -const selectTatget = computed( +const selectTarget = computed( () => chartEditStore.getComponentList[chartEditStore.fetchTargetIndex()] ) -const selectAttr = computed(() => selectTatget.value?.attr || {}) +const selectAttr = computed(() => selectTarget.value?.attr || {}) // * 画布坐标 const canvasPositionList = computed(() => { @@ -148,36 +148,36 @@ watch( // 顶部 if (isSorption(selectTopY, componentTopY)) { line.select.set(lineItem, { y: componentTopY }) - selectTatget.value.setPosition(selectLeftX, componentTopY) + selectTarget.value.setPosition(selectLeftX, componentTopY) } if (isSorption(selectTopY, componentHalfY)) { line.select.set(lineItem, { y: componentHalfY }) - selectTatget.value.setPosition(selectLeftX, componentHalfY) + selectTarget.value.setPosition(selectLeftX, componentHalfY) } if (isSorption(selectTopY, componentBottomY)) { line.select.set(lineItem, { y: componentBottomY }) - selectTatget.value.setPosition(selectLeftX, componentBottomY) + selectTarget.value.setPosition(selectLeftX, componentBottomY) } } if (lineItem.includes('rowc')) { // 顶部 if (isSorption(selectHalfY, componentTopY)) { line.select.set(lineItem, { y: componentTopY }) - selectTatget.value.setPosition( + selectTarget.value.setPosition( selectLeftX, componentTopY - selectH / 2 ) } if (isSorption(selectHalfY, componentHalfY)) { line.select.set(lineItem, { y: componentHalfY }) - selectTatget.value.setPosition( + selectTarget.value.setPosition( selectLeftX, componentHalfY - selectH / 2 ) } if (isSorption(selectHalfY, componentBottomY)) { line.select.set(lineItem, { y: componentBottomY }) - selectTatget.value.setPosition( + selectTarget.value.setPosition( selectLeftX, componentBottomY - selectH / 2 ) @@ -187,18 +187,18 @@ watch( // 顶部 if (isSorption(selectBottomY, componentTopY)) { line.select.set(lineItem, { y: componentTopY }) - selectTatget.value.setPosition(selectLeftX, componentTopY - selectH) + selectTarget.value.setPosition(selectLeftX, componentTopY - selectH) } if (isSorption(selectBottomY, componentHalfY)) { line.select.set(lineItem, { y: componentHalfY }) - selectTatget.value.setPosition( + selectTarget.value.setPosition( selectLeftX, componentHalfY - selectH ) } if (isSorption(selectBottomY, componentBottomY)) { line.select.set(lineItem, { y: componentBottomY }) - selectTatget.value.setPosition( + selectTarget.value.setPosition( selectLeftX, componentBottomY - selectH ) @@ -209,35 +209,35 @@ watch( if (lineItem.includes('coll')) { if (isSorption(selectLeftX, componentLeftX)) { line.select.set(lineItem, { x: componentLeftX }) - selectTatget.value.setPosition(componentLeftX, selectTopY) + selectTarget.value.setPosition(componentLeftX, selectTopY) } if (isSorption(selectLeftX, componentHalfX)) { line.select.set(lineItem, { x: componentHalfX }) - selectTatget.value.setPosition(componentHalfX, selectTopY) + selectTarget.value.setPosition(componentHalfX, selectTopY) } if (isSorption(selectLeftX, componentRightX)) { line.select.set(lineItem, { x: componentRightX }) - selectTatget.value.setPosition(componentRightX, selectTopY) + selectTarget.value.setPosition(componentRightX, selectTopY) } } if (lineItem.includes('colc')) { if (isSorption(selectHalfX, componentLeftX)) { line.select.set(lineItem, { x: componentLeftX }) - selectTatget.value.setPosition( + selectTarget.value.setPosition( componentLeftX - selectW / 2, selectTopY ) } if (isSorption(selectHalfX, componentHalfX)) { line.select.set(lineItem, { x: componentHalfX }) - selectTatget.value.setPosition( + selectTarget.value.setPosition( componentHalfX - selectW / 2, selectTopY ) } if (isSorption(selectHalfX, componentRightX)) { line.select.set(lineItem, { x: componentRightX }) - selectTatget.value.setPosition( + selectTarget.value.setPosition( componentRightX - selectW / 2, selectTopY ) @@ -246,15 +246,15 @@ watch( if (lineItem.includes('colr')) { if (isSorption(selectRightX, componentLeftX)) { line.select.set(lineItem, { x: componentLeftX }) - selectTatget.value.setPosition(componentLeftX - selectW, selectTopY) + selectTarget.value.setPosition(componentLeftX - selectW, selectTopY) } if (isSorption(selectRightX, componentHalfX)) { line.select.set(lineItem, { x: componentHalfX }) - selectTatget.value.setPosition(componentHalfX - selectW, selectTopY) + selectTarget.value.setPosition(componentHalfX - selectW, selectTopY) } if (isSorption(selectRightX, componentRightX)) { line.select.set(lineItem, { x: componentRightX }) - selectTatget.value.setPosition( componentRightX - selectW, selectTopY ) + selectTarget.value.setPosition( componentRightX - selectW, selectTopY ) } }