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.

85 lines
1.8 KiB

5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
  1. <template>
  2. <section>
  3. <logo :collapse="isCollapse"/>
  4. <scroll-bar>
  5. <el-menu
  6. mode="vertical"
  7. :show-timeout="200"
  8. :default-active="$route.path"
  9. :collapse="isCollapse"
  10. background-color="#282F40"
  11. text-color="rgba(255,255,255,.6)"
  12. active-text-color="#409EFF"
  13. >
  14. <sidebar-item :routes="permission_routers"></sidebar-item>
  15. </el-menu>
  16. </scroll-bar>
  17. </section>
  18. </template>
  19. <script>
  20. import { mapGetters } from 'vuex'
  21. import SidebarItem from './SidebarItem'
  22. import Logo from './Logo'
  23. import ScrollBar from '@/components/ScrollBar'
  24. export default {
  25. components: { SidebarItem, ScrollBar,Logo },
  26. computed: {
  27. ...mapGetters([
  28. 'permission_routers',
  29. 'sidebar'
  30. ]),
  31. isCollapse() {
  32. return !this.sidebar.opened
  33. }
  34. }
  35. }
  36. </script>
  37. <style rel="stylesheet/scss" lang="scss" scoped>
  38. .logo {
  39. height: 56px;
  40. width: 100%;
  41. // padding: 0 20px;
  42. display: flex;
  43. align-items: center;
  44. justify-content: center;
  45. img {
  46. width: 100%;
  47. }
  48. .logo-text {
  49. display: flex;
  50. align-items: center;
  51. //justify-content: center;
  52. color: #fff;
  53. img {
  54. //margin-left: 2px;
  55. width: 35%;
  56. }
  57. .main-title {
  58. font-size: 14px;
  59. font-weight: bold;
  60. font-family:'Trebuchet MS', 'Lucida Sans Unicode', 'Lucida Grande', 'Lucida Sans', Arial, sans-serif;
  61. }
  62. .sub-title {
  63. font-size: 14px;
  64. font-weight: bold;
  65. transform: scale(0.8);
  66. // transform-origin: (left, center);
  67. transform-origin: left center;
  68. margin-left: 2px;
  69. }
  70. }
  71. }
  72. .has-logo {
  73. width: 100%;
  74. padding: 0;
  75. img {
  76. width: 80%;
  77. }
  78. }
  79. #app .hideSidebar .submenu-title-noDropdown-logo {
  80. padding: 0 !important;
  81. }
  82. </style>