feat: 修复搜索播放 bug 优化搜索 mv播放器

This commit is contained in:
alger
2024-12-05 21:29:13 +08:00
parent c5e7c87658
commit 5d4c4922fd
6 changed files with 43 additions and 25 deletions
+3 -2
View File
@@ -35,7 +35,6 @@ const state: State = {
searchValue: '',
searchType: 1,
};
const windowData = window as any;
const { handlePlayMusic, nextPlay, prevPlay } = useMusicListHook();
@@ -64,7 +63,9 @@ const mutations = {
},
async setSetData(state: State, setData: any) {
state.setData = setData;
window.electron && window.electron.ipcRenderer.setStoreValue('set', JSON.parse(JSON.stringify(setData)));
if ((window as any).electron) {
(window as any).electron.ipcRenderer.setStoreValue('set', JSON.parse(JSON.stringify(setData)));
}
},
};