index.vue 554 B

12345678910111213141516171819202122232425262728293031323334353637
  1. <template>
  2. <div class="basic-layout">
  3. <layout-header />
  4. <main class="app-main">
  5. <router-view :key="key" />
  6. </main>
  7. </div>
  8. </template>
  9. <script>
  10. import LayoutHeader from './components/LayoutHeader.vue';
  11. export default {
  12. name: 'Layout',
  13. components: {
  14. LayoutHeader
  15. },
  16. computed: {
  17. key() {
  18. return this.$route.path;
  19. }
  20. }
  21. };
  22. </script>
  23. <style lang="scss">
  24. .basic-layout {
  25. height: 100%;
  26. padding-top: 130px;
  27. .app-main {
  28. height: 100%;
  29. overflow-y: auto;
  30. background-color: #f5f5f5;
  31. }
  32. }
  33. </style>