From 528f9b0aa6daf43c31457b50d3f46660cdc1996b Mon Sep 17 00:00:00 2001 From: imsyy Date: Sun, 29 Sep 2024 10:55:21 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9E=20fix:=20=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=E5=BF=AB=E6=8D=B7=E9=94=AE=E9=94=99=E8=AF=AF=20#264?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Global/Provider.vue | 3 +++ src/components/Modal/UpdateApp.vue | 2 +- src/router/index.ts | 32 +++++++++++++++--------------- src/utils/init.ts | 4 ++-- src/views/Home/HomeOnline.vue | 5 ----- 5 files changed, 22 insertions(+), 24 deletions(-) diff --git a/src/components/Global/Provider.vue b/src/components/Global/Provider.vue index c48e0160..1ac97d72 100644 --- a/src/components/Global/Provider.vue +++ b/src/components/Global/Provider.vue @@ -199,6 +199,9 @@ const changeGlobalTheme = () => { railColor: `rgba(${colorSchemes.primary}, 0.2)`, railColorHover: `rgba(${colorSchemes.primary}, 0.3)`, }, + Popover: { + color: `rgb(${colorSchemes["surface-container"]})`, + }, }; } catch (error) { themeOverrides.value = {}; diff --git a/src/components/Modal/UpdateApp.vue b/src/components/Modal/UpdateApp.vue index f95fea74..757fbfa9 100644 --- a/src/components/Modal/UpdateApp.vue +++ b/src/components/Modal/UpdateApp.vue @@ -39,7 +39,7 @@ const startDownload = async () => { window.electron.ipcRenderer.send("start-download-update"); // 监听状态 window.electron.ipcRenderer.on("download-progress", (_, progress) => { - downloadProgress.value = Number(progress); + downloadProgress.value = Number(progress?.percent || 0); }); // 更新错误 window.electron.ipcRenderer.on("update-error", (_, error) => { diff --git a/src/router/index.ts b/src/router/index.ts index 5c1829b8..017e00e6 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -9,22 +9,22 @@ const router: Router = createRouter({ history: createWebHashHistory(import.meta.env.BASE_URL), routes, // 保留滚动 - scrollBehavior(to, _, savedPosition) { - if (savedPosition) { - return new Promise((resolve) => { - setTimeout(() => { - resolve(savedPosition); - }, 300); - }); - } else if (to.hash) { - return { - el: to.hash, - behavior: "smooth", - }; - } else { - return { top: 0, left: 0, behavior: "smooth" }; - } - }, + // scrollBehavior(to, _, savedPosition) { + // if (savedPosition) { + // return new Promise((resolve) => { + // setTimeout(() => { + // resolve(savedPosition); + // }, 300); + // }); + // } else if (to.hash) { + // return { + // el: to.hash, + // behavior: "smooth", + // }; + // } else { + // return { top: 0, left: 0, behavior: "smooth" }; + // } + // }, }); // 前置守卫 diff --git a/src/utils/init.ts b/src/utils/init.ts index 2b7af85a..1d3cbd36 100644 --- a/src/utils/init.ts +++ b/src/utils/init.ts @@ -80,10 +80,10 @@ const keyDownEvent = debounce((event: KeyboardEvent) => { player.playOrPause(); break; case "playPrev": - player.nextOrPrev("next"); + player.nextOrPrev("prev"); break; case "playNext": - player.nextOrPrev("prev"); + player.nextOrPrev("next"); break; case "volumeUp": player.setVolume("up"); diff --git a/src/views/Home/HomeOnline.vue b/src/views/Home/HomeOnline.vue index 5c02d583..87ce34e9 100644 --- a/src/views/Home/HomeOnline.vue +++ b/src/views/Home/HomeOnline.vue @@ -36,11 +36,6 @@ {{ item.name }} -