ProjectContainer.vue 812 B

12345678910111213141516171819202122232425262728293031323334353637383940
  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. /* 用于功能页组件最外层 */
  28. .content{
  29. width: 100%;
  30. padding: 25px;
  31. box-sizing: border-box;
  32. display: flex;
  33. flex-direction: column;
  34. justify-content: flex-start;
  35. align-items: center;
  36. }
  37. </style>