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); - } + } };