123456789101112131415161718192021222324252627282930313233343536373839 |
- <template>
- <a-config-provider
- :theme="{
- token: {
- colorPrimary: '#bd4b36',
- },
- }"
- >
- <NavBar />
- <main>
- <RouterView />
- </main>
- <Footer />
- </a-config-provider>
- </template>
- <script setup lang="ts">
- import { onMounted, watch } from 'vue';
- import { RouterView, useRoute } from 'vue-router'
- import NavBar from './components/NavBar.vue';
- import Footer from './components/Footer.vue';
- import { useAuthStore } from './stores/auth';
- const authStore = useAuthStore();
- onMounted(() => {
- authStore.loadLoginState();
- });
- const route = useRoute();
- watch(route, () => {
- window.scrollTo({
- top: 0,
- behavior: 'instant'
- })
- });
- </script>
|