mirror of
https://github.com/algerkong/AlgerMusicPlayer.git
synced 2026-04-24 08:07:23 +08:00
✨ feat:确保仅在 Electron 中调用 API 发送歌曲数据
This commit is contained in:
@@ -116,7 +116,9 @@ onMounted(async () => {
|
||||
// 使用 nextTick 确保 DOM 更新后再初始化
|
||||
await nextTick();
|
||||
initAudioListeners();
|
||||
window.api.sendSong(cloneDeep(playerStore.playMusic));
|
||||
if (isElectron) {
|
||||
window.api.sendSong(cloneDeep(playerStore.playMusic));
|
||||
}
|
||||
}
|
||||
// 初始化快捷键
|
||||
initShortcut();
|
||||
|
||||
Reference in New Issue
Block a user