feat: 优化歌词窗口交互和同步机制

- 增强歌词窗口数据同步逻辑,支持实时更新和状态管理
- 添加歌词窗口关闭事件监听和状态处理
- 优化无歌词时的默认提示和窗口行为
- 实现歌词窗口定时同步机制,提升用户体验
- 修复歌词窗口打开和关闭时的状态控制
- 国际化支持无歌曲播放时的提示文案
This commit is contained in:
alger
2025-03-08 19:00:50 +08:00
parent e43e85480d
commit f9878ed88a
8 changed files with 226 additions and 29 deletions
+10 -3
View File
@@ -113,11 +113,11 @@
<template #trigger>
<i
class="iconfont ri-netease-cloud-music-line"
:class="{ 'text-green-500': isLyricWindowOpen }"
@click="openLyricWindow"
:class="{ 'text-green-500': isLyricWindowOpen, 'disabled-icon': !playMusic.id }"
@click="playMusic.id && openLyricWindow()"
></i>
</template>
{{ t('player.playBar.lyric') }}
{{ playMusic.id ? t('player.playBar.lyric') : t('player.playBar.noSongPlaying') }}
</n-tooltip>
<n-popover
trigger="click"
@@ -677,6 +677,13 @@ const isEQVisible = ref(false);
@apply text-red-500 hover:text-red-600 !important;
}
.disabled-icon {
@apply opacity-50 cursor-not-allowed !important;
&:hover {
@apply text-inherit !important;
}
}
.icon-loop,
.icon-single-loop {
font-size: 1.5rem;