mirror of
https://github.com/tcsenpai/swingmusic.git
synced 2025-07-28 21:51:41 +00:00
scroll to top on page change
This commit is contained in:
parent
857c2484fe
commit
67d19fb6e3
37
src/App.vue
37
src/App.vue
@ -21,22 +21,23 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import Navigation from "./components/LeftSidebar/Navigation.vue";
|
||||
import Navigation from "@/components/LeftSidebar/Navigation.vue";
|
||||
|
||||
import Main from "./components/RightSideBar/Main.vue";
|
||||
import nowPlaying from "./components/LeftSidebar/nowPlaying.vue";
|
||||
import NavBar from "./components/nav/NavBar.vue";
|
||||
import Tabs from "./components/RightSideBar/Tabs.vue";
|
||||
import SearchInput from "./components/RightSideBar/SearchInput.vue";
|
||||
import useContextStore from "./stores/context";
|
||||
import ContextMenu from "./components/contextMenu.vue";
|
||||
import Modal from "./components/modal.vue";
|
||||
import Notification from "./components/Notification.vue";
|
||||
import useQStore from "./stores/queue";
|
||||
import useShortcuts from "./composables/useKeyboard";
|
||||
import Logo from "./components/Logo.vue";
|
||||
import RightSideBar from "@/components/RightSideBar/Main.vue";
|
||||
import nowPlaying from "@/components/LeftSidebar/nowPlaying.vue";
|
||||
import NavBar from "@/components/nav/NavBar.vue";
|
||||
import Tabs from "@/components/RightSideBar/Tabs.vue";
|
||||
import SearchInput from "@/components/RightSideBar/SearchInput.vue";
|
||||
import useContextStore from "@/stores/context";
|
||||
import ContextMenu from "@/components/contextMenu.vue";
|
||||
import Modal from "@/components/modal.vue";
|
||||
import Notification from "@/components/Notification.vue";
|
||||
import useQStore from "@/stores/queue";
|
||||
import useShortcuts from "@/composables/useKeyboard";
|
||||
import Logo from "@/components/Logo.vue";
|
||||
import Content from "@/components/Content.vue";
|
||||
import { useRouter } from "vue-router";
|
||||
|
||||
const RightSideBar = Main;
|
||||
const context_store = useContextStore();
|
||||
const queue = useQStore();
|
||||
const app_dom = document.getElementById("app");
|
||||
@ -49,6 +50,10 @@ app_dom.addEventListener("click", (e) => {
|
||||
context_store.hideContextMenu();
|
||||
}
|
||||
});
|
||||
|
||||
useRouter().afterEach(() => {
|
||||
document.getElementById("acontent")?.scrollTo(0, 0);
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
@ -65,10 +70,6 @@ app_dom.addEventListener("click", (e) => {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.r-sidebar {
|
||||
&::-webkit-scrollbar {
|
||||
display: none;
|
||||
|
@ -14,7 +14,7 @@
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
<script setup lang="ts">
|
||||
import useTabStore from "../../stores/tabs";
|
||||
|
||||
const tabs = useTabStore();
|
||||
|
@ -45,7 +45,7 @@
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
<script setup lang="ts">
|
||||
import useContextStore from "../stores/context";
|
||||
|
||||
const context = useContextStore();
|
||||
|
Loading…
x
Reference in New Issue
Block a user