App.vue 656 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. <template>
  2. <template v-if="route.name === 'Login'">
  3. <router-view />
  4. </template>
  5. <template v-else>
  6. <Layout>
  7. <router-view />
  8. </Layout>
  9. </template>
  10. </template>
  11. <script lang="ts" setup>
  12. import Layout from "@/components/Layout";
  13. import { useRoute } from "vue-router";
  14. const route = useRoute();
  15. </script>
  16. <style>
  17. #app {
  18. font-family: Avenir, Helvetica, Arial, sans-serif;
  19. -webkit-font-smoothing: antialiased;
  20. -moz-osx-font-smoothing: grayscale;
  21. text-align: center;
  22. color: #2c3e50;
  23. }
  24. #nav {
  25. padding: 30px;
  26. }
  27. #nav a {
  28. font-weight: bold;
  29. color: #2c3e50;
  30. }
  31. #nav a.router-link-exact-active {
  32. color: #42b983;
  33. }
  34. </style>