From 92ede5739d437772b2acb6d382661c87165d8ca3 Mon Sep 17 00:00:00 2001 From: imsyy Date: Mon, 24 Nov 2025 15:06:39 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9E=20fix:=20=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=E6=9C=AA=E5=8A=A0=E8=BD=BD=E6=8F=90=E7=A4=BA=20#561?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- auto-eslint.mjs | 3 +- electron/main/ipc/ipc-lyric.ts | 2 +- electron/main/ipc/ipc-tray.ts | 3 +- src/components/Card/SongCard.vue | 1 - src/components/List/SongList.vue | 2 +- src/components/Player/MainPlayList.vue | 22 +++++++++---- src/components/Setting/LyricsSetting.vue | 4 +-- src/stores/music.ts | 7 ++-- src/utils/initIpc.ts | 2 +- src/utils/player.ts | 41 +++++++++++------------- src/views/DesktopLyric/index.vue | 10 +++--- 11 files changed, 52 insertions(+), 45 deletions(-) diff --git a/auto-eslint.mjs b/auto-eslint.mjs index a9714ef..f3fad90 100644 --- a/auto-eslint.mjs +++ b/auto-eslint.mjs @@ -59,7 +59,6 @@ export default { "isRef": true, "isShallow": true, "makeDestructurable": true, - "manualResetRef": true, "markRaw": true, "nextTick": true, "onActivated": true, @@ -97,11 +96,11 @@ export default { "refAutoReset": true, "refDebounced": true, "refDefault": true, - "refManualReset": true, "refThrottled": true, "refWithControl": true, "resolveComponent": true, "resolveRef": true, + "resolveUnref": true, "shallowReactive": true, "shallowReadonly": true, "shallowRef": true, diff --git a/electron/main/ipc/ipc-lyric.ts b/electron/main/ipc/ipc-lyric.ts index 40d16b7..1776db8 100644 --- a/electron/main/ipc/ipc-lyric.ts +++ b/electron/main/ipc/ipc-lyric.ts @@ -82,7 +82,7 @@ const initLyricIpc = (): void => { // 音乐名称更改 ipcMain.on("play-song-change", (_, title) => { - if (!title || !isWinAlive(lyricWin)) return; + if (!isWinAlive(lyricWin)) return; lyricWin.webContents.send("update-desktop-lyric-data", { playName: title }); }); diff --git a/electron/main/ipc/ipc-tray.ts b/electron/main/ipc/ipc-tray.ts index dcad051..b870c03 100644 --- a/electron/main/ipc/ipc-tray.ts +++ b/electron/main/ipc/ipc-tray.ts @@ -1,6 +1,7 @@ import { ipcMain } from "electron"; import { getMainTray } from "../tray"; import lyricWindow from "../windows/lyric-window"; +import { appName } from "../utils/config"; /** * 托盘 IPC @@ -18,7 +19,7 @@ const initTrayIpc = (): void => { // 音乐名称更改 ipcMain.on("play-song-change", (_, title) => { - if (!title) return; + if (!title) title = appName; // 更改标题 tray?.setTitle(title); tray?.setPlayName(title); diff --git a/src/components/Card/SongCard.vue b/src/components/Card/SongCard.vue index f81b92c..40a233e 100644 --- a/src/components/Card/SongCard.vue +++ b/src/components/Card/SongCard.vue @@ -44,7 +44,6 @@ import type { DropdownOption } from "naive-ui"; -import type { SongType, SortType } from "@/types/main"; +import { SongType, SortType } from "@/types/main"; import { useMusicStore, useStatusStore } from "@/stores"; import { VirtList } from "vue-virt-list"; import { entries, isEmpty } from "lodash-es"; diff --git a/src/components/Player/MainPlayList.vue b/src/components/Player/MainPlayList.vue index d19b23f..06d04d4 100644 --- a/src/components/Player/MainPlayList.vue +++ b/src/components/Player/MainPlayList.vue @@ -81,13 +81,7 @@