From 9ce872eebed89060c3ab33a6a1ee36f0d9651439 Mon Sep 17 00:00:00 2001 From: alger Date: Sun, 30 Mar 2025 12:56:42 +0800 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20feat:=20=E4=BC=98=E5=8C=96=E6=92=AD?= =?UTF-8?q?=E6=94=BE=E6=9D=A1=E6=BB=91=E5=9D=97=E6=8F=90=E7=A4=BA=E6=A0=B7?= =?UTF-8?q?=E5=BC=8F=EF=BC=8C=E6=B7=BB=E5=8A=A0=E6=BB=91=E5=9D=97=E6=82=AC?= =?UTF-8?q?=E5=81=9C=E6=8F=90=E7=A4=BA=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/renderer/index.css | 2 +- src/renderer/layout/components/PlayBar.vue | 16 ++++++++++++++-- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/src/renderer/index.css b/src/renderer/index.css index 34a3616..0555b7e 100644 --- a/src/renderer/index.css +++ b/src/renderer/index.css @@ -11,7 +11,7 @@ } .n-slider-handle-indicator--top { - @apply bg-transparent text-2xl px-2 py-1 shadow-none mb-0 dark:text-[#ffffffdd] text-[#000000dd] !important; + @apply bg-transparent text-2xl px-2 py-1 shadow-none mb-0 text-white bg-dark-300 dark:bg-gray-800 bg-opacity-80 rounded-lg !important; mix-blend-mode: difference !important; } diff --git a/src/renderer/layout/components/PlayBar.vue b/src/renderer/layout/components/PlayBar.vue index 404cc2e..25bdc0b 100644 --- a/src/renderer/layout/components/PlayBar.vue +++ b/src/renderer/layout/components/PlayBar.vue @@ -25,6 +25,9 @@ :max="allTime" :min="0" :format-tooltip="formatTooltip" + :show-tooltip="showSliderTooltip" + @mouseenter="showSliderTooltip = true" + @mouseleave="showSliderTooltip = false" >
@@ -313,6 +316,7 @@ function handlePrev() { } const MusicFullRef = ref(null); +const showSliderTooltip = ref(false); // 播放暂停按钮事件 const playMusicEvent = async () => { @@ -657,8 +661,16 @@ const isEQVisible = ref(false); opacity: 0; } - &:hover .n-slider-handle { - opacity: 1; + &:hover { + .n-slider-handle { + opacity: 1; + } + } + + // 确保悬停时提示样式正确 + .n-slider-tooltip { + @apply bg-gray-800 text-white text-xs py-1 px-2 rounded; + z-index: 999999; } } }