From d44166ff4cad3f6fd007dde6d282f7dc9a549913 Mon Sep 17 00:00:00 2001 From: tong Date: Fri, 31 May 2024 21:26:23 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=9B=B4=E6=96=B0=E5=B1=95=E7=A4=BA?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dev/components/MuiscPlayer.vue | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/dev/components/MuiscPlayer.vue b/dev/components/MuiscPlayer.vue index 4bb9545..64286e9 100644 --- a/dev/components/MuiscPlayer.vue +++ b/dev/components/MuiscPlayer.vue @@ -2,10 +2,9 @@
{ window.addEventListener("scroll", trackPos); - }, 2000); + }, 1000); window.moveMusicBar = () => { const musicBarEle = document.getElementById("float-music"); const timeInner = document.querySelectorAll(".aplayer-time-inner"); @@ -122,17 +122,19 @@ musicBarEle.style.position = 'fixed'; musicBarEle.style.display = "block" } - } - const afterRouteListener = (before, after) => { + } + const afterRouteListener = (before, after) => { if (before.path === "/") { - window.hompageRender(); + setTimeout(() => { + window.hompageRender(); + }, 1000); } else { window.moveMusicBar(); } } this.$router.afterHooks.push(afterRouteListener); afterRouteListener(this.$route); - } + } };