ProjectContainer.vue 775 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. <template>
  2. <el-aside width="65">
  3. <SideBar></SideBar>
  4. </el-aside>
  5. <el-main class="container">
  6. <router-view></router-view>
  7. </el-main>
  8. </template>
  9. <script>
  10. import SideBar from '@/components/SideBar.vue';
  11. import { WorkspaceDispatcher } from '@/store/dispatchers';
  12. export default {
  13. name: 'ProjectContainer',
  14. components: { SideBar },
  15. mounted() {
  16. const { projectId } = this.$route.params;
  17. WorkspaceDispatcher.changeProject(parseInt(projectId, 10));
  18. },
  19. };
  20. </script>
  21. <style scoped>
  22. .container{
  23. background-color: #FFFFFF;
  24. width: calc(100% - 42px);
  25. min-height: 60vh;
  26. }
  27. .content{
  28. width: 100%;
  29. padding: 15px;
  30. box-sizing: border-box;
  31. display: flex;
  32. flex-direction: column;
  33. justify-content: flex-start;
  34. align-items: center;
  35. }
  36. </style>