From 7edfa614f0305c2fbe1c7ac51443958c8f50bd00 Mon Sep 17 00:00:00 2001 From: chutingting Date: Thu, 7 Dec 2023 20:59:48 +0800 Subject: [PATCH] =?UTF-8?q?=E9=80=89=E4=B8=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/EditPosition.vue | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/components/EditPosition.vue b/src/components/EditPosition.vue index 8c39478..c5efbc8 100644 --- a/src/components/EditPosition.vue +++ b/src/components/EditPosition.vue @@ -51,7 +51,7 @@ v-for="(item, index) in materialList.scList" :key="item.id" class="scListItem" - :class="showBorderActive == item.id ? 'border' : ''" + :class="scBorderActive == index ? 'border' : ''" @mousedown.stop="handleDragSc(item, index, $event)" :style="{ top: item.y / props.proportion + 'px', @@ -64,7 +64,7 @@
@@ -77,7 +77,7 @@
{ }); // 拖动盒子 const showBorderActive = ref(-1); //判断显示边框 +const scBorderActive = ref('') watch( () => props.materialList.virtual.id, (newValue, oldValue) => { @@ -253,7 +254,7 @@ function changeScale(event) { //#region 素材图逻辑 const handleDragSc = (item, index, event) => { realImgUrl.value = item.material; - + scBorderActive.value= index showBorderActive.value = item.id; event.preventDefault(); const imageElement = fatherBox.value;