mirror of
https://github.com/imsyy/SPlayer.git
synced 2026-04-26 15:35:56 +03:00
[PR #781] [MERGED] 🐛fix(desktop-lyrics): 修复桌面歌词加载时的占位符闪烁问题 #638
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/imsyy/SPlayer/pull/781
Author: @Pissofdvpe
Created: 1/30/2026
Status: ✅ Merged
Merged: 2/3/2026
Merged by: @imsyy
Base:
dev← Head:dev📝 Commits (5)
8d847ca🐛fix(desktop-lyrics): 修复桌面歌词加载时的占位符闪烁问题905b912Merge branch 'imsyy:dev' into dev4a1c3c2🐛fix(desktop-lyrics): 修复桌面歌词加载时的占位符闪烁问题,解决onMounted逻辑整合4c9378a🐛fix(desktop-lyrics): 优化桌面歌词加载闪烁修复,提升代码可维护性8d65633🐛fix(desktop-lyrics): 修复桌面歌词加载闪烁竞态条件,优化初始化机制📊 Changes
1 file changed (+17 additions, -3 deletions)
View changed files
📝
src/views/DesktopLyric/index.vue(+17 -3)📄 Description
如图

问题现象
在加载实际歌词或歌曲状态之前,桌面歌词窗口会先渲染一个初始的占位符
SPlayer Desktop Lyric,导致视觉上的闪烁。修复方案
通过在桌面歌词组件
DesktopLyric/index.vue中引入一个短暂的“初始化”阶段来解决此问题:加载时屏蔽渲染:在组件挂载后的最初 250ms 内,不渲染任何内容,从根源上避免了闪烁。
恢复正常逻辑:初始化阶段结束后,组件恢复其原始的渲染逻辑。
此方案精确地区分了“加载中的短暂空白”和“无歌名且无歌词”状态,在彻底解决闪烁问题的同时,保留了原有的预期功能。
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.