App.vue 893 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. <script setup lang="ts">
  2. import '@/assets/style/iconfont.css'
  3. import { useUserStore } from '@/stores/user'
  4. import { RouterView } from 'vue-router'
  5. import { onMounted } from 'vue'
  6. const useUser = useUserStore()
  7. useUser.getInfo()
  8. onMounted(() => {
  9. window.onresize = () => {
  10. console.log('window.onresize');
  11. }
  12. })
  13. </script>
  14. <template>
  15. <div class="app">
  16. <RouterView />
  17. </div>
  18. </template>
  19. <style scoped>
  20. header {
  21. line-height: 1.5;
  22. max-height: 100vh;
  23. }
  24. .logo {
  25. display: block;
  26. margin: 0 auto 2rem;
  27. }
  28. nav {
  29. width: 100%;
  30. font-size: 12px;
  31. text-align: center;
  32. margin-top: 2rem;
  33. }
  34. nav a.router-link-exact-active {
  35. color: var(--color-text);
  36. }
  37. nav a.router-link-exact-active:hover {
  38. background-color: transparent;
  39. }
  40. nav a {
  41. display: inline-block;
  42. padding: 0 1rem;
  43. border-left: 1px solid var(--color-border);
  44. }
  45. nav a:first-of-type {
  46. border: 0;
  47. }
  48. </style>