SideBar.vue 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. <template>
  2. <scroll-bar>
  3. <div class="logo">
  4. <img src="https://img.alicdn.com/tfs/TB13UQpnYGYBuNjy0FoXXciBFXa-242-134.png" width="40" />
  5. <span class="site-name">ADMIN LITE</span>
  6. </div>
  7. <el-menu mode="vertical" :show-timeout="200" :router="true" background-color="#00142a" text-color="hsla(0, 0%, 100%, .65)" active-text-color="#409EFF">
  8. <el-menu-item index="/404">404</el-menu-item>
  9. <el-menu-item index="/user">用户管理</el-menu-item>
  10. <el-menu-item index="/views/certificate/index">凭证管理</el-menu-item>
  11. <el-menu-item index="/views/account/register">账号管理</el-menu-item>
  12. <<<<<<< HEAD
  13. <el-menu-item index="/views/duty/duty">责任认定</el-menu-item>
  14. =======
  15. <el-menu-item index="/views/audit/behavior">行为审计</el-menu-item>
  16. >>>>>>> 6da7048b56a7ef2226d4ddabdcca57de0671bb83
  17. <el-submenu index="">
  18. <template #title>
  19. 权限管理
  20. </template>
  21. <el-menu-item index="/group">群组管理</el-menu-item>
  22. <el-menu-item index="/resources">资源管理</el-menu-item>
  23. <el-menu-item index="/role">角色管理</el-menu-item>
  24. <el-menu-item index="/right">权限管理</el-menu-item>
  25. <el-menu-item index="/confer">权限授予</el-menu-item>
  26. </el-submenu>
  27. </el-menu>
  28. </scroll-bar>
  29. </template>
  30. <script>
  31. import ScrollBar from './ScrollBar.vue';
  32. export default {
  33. components: { ScrollBar },
  34. name: 'SideBar',
  35. props: {},
  36. data() {
  37. return {};
  38. },
  39. };
  40. </script>
  41. <style lang="scss" scoped>
  42. .logo {
  43. display: flex;
  44. justify-content: center;
  45. align-items: center;
  46. height: 64px;
  47. line-height: 64px;
  48. background: #002140;
  49. color: #fff;
  50. text-align: center;
  51. font-size: 20px;
  52. font-weight: 600;
  53. overflow: hidden;
  54. }
  55. .site-name {
  56. margin-left: 10px;
  57. }
  58. .sidebar-container {
  59. box-shadow: 2px 0 6px rgba(0, 21, 41, 0.35);
  60. transition: width 0.28s;
  61. width: 256px !important;
  62. height: 100%;
  63. position: fixed;
  64. top: 0;
  65. bottom: 0;
  66. left: 0;
  67. z-index: 1001;
  68. overflow: hidden;
  69. a {
  70. display: inline-block;
  71. width: 100%;
  72. }
  73. .el-menu {
  74. padding-top: 16px;
  75. width: 100% !important;
  76. border: none;
  77. }
  78. .el-submenu .el-menu-item {
  79. min-width: 256px !important;
  80. padding-left: 48px !important;
  81. background-color: #000c17 !important;
  82. &:hover {
  83. color: #fff !important;
  84. }
  85. }
  86. .el-menu-item,
  87. .el-submenu .el-menu-item {
  88. &.is-active {
  89. background-color: #188fff !important;
  90. color: #fff !important;
  91. }
  92. }
  93. .el-submenu__title i {
  94. font-size: 16px;
  95. color: rgba(255, 255, 255, 0.65);
  96. }
  97. }
  98. </style>