[PR #781] [MERGED] 🐛fix(desktop-lyrics): 修复桌面歌词加载时的占位符闪烁问题 #638

Closed
opened 2026-02-27 07:12:35 +03:00 by kerem · 0 comments
Owner

📋 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: devHead: dev


📝 Commits (5)

  • 8d847ca 🐛fix(desktop-lyrics): 修复桌面歌词加载时的占位符闪烁问题
  • 905b912 Merge branch 'imsyy:dev' into dev
  • 4a1c3c2 🐛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

如图
截屏2026-01-30 16.09.23.png

问题现象
在加载实际歌词或歌曲状态之前,桌面歌词窗口会先渲染一个初始的占位符 SPlayer Desktop Lyric,导致视觉上的闪烁。

修复方案
通过在桌面歌词组件 DesktopLyric/index.vue 中引入一个短暂的“初始化”阶段来解决此问题:

  • 加载时屏蔽渲染:在组件挂载后的最初 250ms 内,不渲染任何内容,从根源上避免了闪烁。

  • 恢复正常逻辑:初始化阶段结束后,组件恢复其原始的渲染逻辑。

此方案精确地区分了“加载中的短暂空白”和“无歌名且无歌词”状态,在彻底解决闪烁问题的同时,保留了原有的预期功能。


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/imsyy/SPlayer/pull/781 **Author:** [@Pissofdvpe](https://github.com/Pissofdvpe) **Created:** 1/30/2026 **Status:** ✅ Merged **Merged:** 2/3/2026 **Merged by:** [@imsyy](https://github.com/imsyy) **Base:** `dev` ← **Head:** `dev` --- ### 📝 Commits (5) - [`8d847ca`](https://github.com/imsyy/SPlayer/commit/8d847cab5ce609c9cf0e927df242a78473216ec8) 🐛fix(desktop-lyrics): 修复桌面歌词加载时的占位符闪烁问题 - [`905b912`](https://github.com/imsyy/SPlayer/commit/905b9120f85d25177b51cab250a667f398bf28b5) Merge branch 'imsyy:dev' into dev - [`4a1c3c2`](https://github.com/imsyy/SPlayer/commit/4a1c3c2ac7529cee6e1cd00ed73e54491fd3c22d) 🐛fix(desktop-lyrics): 修复桌面歌词加载时的占位符闪烁问题,解决onMounted逻辑整合 - [`4c9378a`](https://github.com/imsyy/SPlayer/commit/4c9378a963d86712974e472b7d5e4cf55dd16819) 🐛fix(desktop-lyrics): 优化桌面歌词加载闪烁修复,提升代码可维护性 - [`8d65633`](https://github.com/imsyy/SPlayer/commit/8d6563348fc0b07d60e6783273d9d6a312c73b56) 🐛fix(desktop-lyrics): 修复桌面歌词加载闪烁竞态条件,优化初始化机制 ### 📊 Changes **1 file changed** (+17 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `src/views/DesktopLyric/index.vue` (+17 -3) </details> ### 📄 Description **如图** ![截屏2026-01-30 16.09.23.png](https://youke.xn--y7xa690gmna.cn/s1/2026/01/30/697c8035239e7.webp) **问题现象** 在加载实际歌词或歌曲状态之前,桌面歌词窗口会先渲染一个初始的占位符 `SPlayer Desktop Lyric`,导致视觉上的闪烁。 **修复方案** 通过在桌面歌词组件 `DesktopLyric/index.vue` 中引入一个短暂的“初始化”阶段来解决此问题: - **加载时屏蔽渲染**:在组件挂载后的最初 250ms 内,不渲染任何内容,从根源上避免了闪烁。 - **恢复正常逻辑**:初始化阶段结束后,组件恢复其原始的渲染逻辑。 此方案精确地区分了“加载中的短暂空白”和“无歌名且无歌词”状态,在彻底解决闪烁问题的同时,保留了原有的预期功能。 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-27 07:12:35 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/SPlayer#638
No description provided.