From 0f8859c9227f428fac2be6326985f9b637f1d4c8 Mon Sep 17 00:00:00 2001 From: Kirigaya <1193466151@qq.com> Date: Wed, 4 Sep 2024 11:33:40 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=20pivot=20=E4=BD=93=E9=AA=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/pivot/index.vue | 4 ++-- src/components/pivot/user-pivot.vue | 11 ++++++++--- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/src/components/pivot/index.vue b/src/components/pivot/index.vue index fda4593..caaa316 100644 --- a/src/components/pivot/index.vue +++ b/src/components/pivot/index.vue @@ -20,7 +20,7 @@ @@ -52,7 +52,7 @@ function onMousedown() { updateWireCurrentValue(); changeCursorLocation(); - console.log('enter'); + console.log(MovingPivot); // 关闭所有 for (const id of UserPivotCtxShows.keys()) { diff --git a/src/components/pivot/user-pivot.vue b/src/components/pivot/user-pivot.vue index 6d13269..ad4d9d2 100644 --- a/src/components/pivot/user-pivot.vue +++ b/src/components/pivot/user-pivot.vue @@ -5,6 +5,7 @@ @mouseleave="onLeave()" @contextmenu.prevent="handleUserContextMenu($event)" class="user-pivot" + :style="userPivotStyle" >
{ if (props.id === currentPivotId.value) { const rgbColor = parseColor(props.color); - const brighterColor = increaseBrightness(rgbColor, 10); + const brighterColor = increaseBrightness(rgbColor, 20); return `rgb(${brighterColor.r}, ${brighterColor.g}, ${brighterColor.b})`; } return props.color; }); +const userPivotStyle = computed(() => ({ + cursor: vline.dragEnable ? 'ew-resize': 'pointer' +})); + const colorStyle = computed(() => ({ backgroundColor: currentColor.value })); @@ -198,8 +203,8 @@ function onVLineMouseup() { currentPivotId.value = 0; vline.originTime = 0; vline.dragEnable = false; - MovingPivot.currentTakenPivot = pivot; - MovingPivot.show = false; + // MovingPivot.currentTakenPivot = pivot; + // MovingPivot.show = false; } const contextmenu = reactive({