MainLayout.vue 727 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. <template>
  2. <div class="main-layout">
  3. <AppHeader />
  4. <div class="main-layout-body">
  5. <AppSidebar />
  6. <main class="main-layout-content">
  7. <router-view />
  8. </main>
  9. </div>
  10. </div>
  11. </template>
  12. <script setup>
  13. import AppHeader from "@/components/layout/AppHeader.vue";
  14. import AppSidebar from "@/components/layout/AppSidebar.vue";
  15. defineOptions({
  16. name: "MainLayout",
  17. });
  18. </script>
  19. <style scoped lang="scss">
  20. .main-layout {
  21. box-sizing: border-box;
  22. display: flex;
  23. flex-direction: column;
  24. min-height: 100vh;
  25. }
  26. .main-layout-body {
  27. display: flex;
  28. flex: 1;
  29. min-height: 0;
  30. }
  31. .main-layout-content {
  32. flex: 1;
  33. min-width: 0;
  34. box-sizing: border-box;
  35. background: #f4f7fa;
  36. }
  37. </style>