layout.vue 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. <template>
  2. <a-layout class="a-layout" >
  3. <Navbar />
  4. <a-layout>
  5. <Sider :router="silders" />
  6. <a-layout style="padding: 0 24px 24px; margin-top: 20px;">
  7. <Breadcrumb />
  8. <a-layout-content
  9. :style="{ background: '#fff', padding: '24px', margin: 0, minHeight: '280px' }"
  10. >
  11. <RouterView></RouterView>
  12. </a-layout-content>
  13. </a-layout>
  14. </a-layout>
  15. </a-layout>
  16. </template>
  17. <script lang="ts" setup >
  18. import router from '@/router/index'
  19. import Navbar from './navbar.vue'
  20. import Sider from './sider.vue'
  21. import Breadcrumb from './breadcrumb.vue'
  22. const silders = router.options.routes.find(route => route.path === '/')?.children
  23. </script>
  24. <style>
  25. .a-layout {
  26. width: 100vw;
  27. height: 100vh;
  28. }
  29. #components-layout-demo-top-side-2 .logo {
  30. float: left;
  31. width: 120px;
  32. height: 31px;
  33. margin: 16px 24px 16px 0;
  34. background: rgba(255, 255, 255, 0.3);
  35. }
  36. .ant-row-rtl #components-layout-demo-top-side-2 .logo {
  37. float: right;
  38. margin: 16px 0 16px 24px;
  39. }
  40. .site-layout-background {
  41. background: #fff;
  42. }
  43. </style>