You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

87 lines
1.7 KiB

  1. <template>
  2. <el-container class="full-height">
  3. <el-header class="header">Header</el-header>
  4. <el-container>
  5. <el-aside class="aside">
  6. <div class="aside-content">
  7. <div class="aside-item" @click="$router.push('/')">主页</div>
  8. <div class="aside-item" @click="$router.push('/clubView')">博股俱乐部</div>
  9. <div class="aside-item" @click="$router.push('/channelView')">频道</div>
  10. <div class="aside-item" @click="$router.push('/bookView')">电子书</div>
  11. <div class="aside-item" @click="$router.push('/liveView')">直播广场</div>
  12. </div>
  13. </el-aside>
  14. <el-main class="main">
  15. <RouterView />
  16. </el-main>
  17. </el-container>
  18. </el-container>
  19. </template>
  20. <script setup>
  21. import { ElContainer, ElHeader, ElAside, ElMain } from 'element-plus';
  22. </script>
  23. <style scoped>
  24. .full-height {
  25. height: 100%;
  26. }
  27. .header {
  28. background-color: #e6f2ff;
  29. text-align: center;
  30. line-height: 60px;
  31. font-size: 18px;
  32. height: 60px !important;
  33. }
  34. .aside {
  35. width: 200px;
  36. background-color: #f0f0f0;
  37. display: flex;
  38. flex-direction: column;
  39. }
  40. .aside-content {
  41. height: 100%;
  42. display: flex;
  43. flex-direction: column;
  44. margin-top: 15px;
  45. }
  46. .aside-item {
  47. padding: 15px;
  48. margin: 5px 0;
  49. background-color: #e0e0e0;
  50. border-radius: 4px;
  51. cursor: pointer;
  52. transition: background-color 0.3s;
  53. text-align: center;
  54. font-size: 14px;
  55. color: #333;
  56. font-weight: 500;
  57. }
  58. .aside-item:hover {
  59. background-color: #d0d0d0;
  60. }
  61. .aside-item.active {
  62. background-color: #409eff;
  63. color: white;
  64. }
  65. .main {
  66. background-color: #f5f5f5;
  67. padding: 20px;
  68. text-align: center;
  69. line-height: 40px;
  70. }
  71. html,
  72. body {
  73. height: 100%;
  74. margin: 0;
  75. padding: 0;
  76. }
  77. </style>