浏览代码

feat: Logo优化

justkang 1 周之前
父节点
当前提交
ed6c51066f
共有 2 个文件被更改,包括 11 次插入7 次删除
  1. 10 6
      src/layout/components/Sidebar/Logo.vue
  2. 1 1
      src/views/index.vue

+ 10 - 6
src/layout/components/Sidebar/Logo.vue

@@ -79,20 +79,22 @@ export default {
 .sidebar-logo-container {
     position: relative;
     // width: 100%;
-    height: 50px;
+    height: 70px;
     line-height: 50px;
     background: #2b2f3a;
     overflow: hidden;
-    margin-left: 12px;
     margin-top: 15px;
-    width: 400px; /* 固定宽度 */
+    width: 100%; /* 固定宽度 */
     overflow: hidden; /* 隐藏超出部分 */
     white-space: nowrap; /* 不换行 */
 
     & .sidebar-logo-link {
         height: 100%;
         width: 100%;
-
+        display: flex !important;
+        flex-direction: column !important;
+        justify-content: center;
+        align-items: center;
         & .sidebar-logo {
             width: 30px; // 30
             height: 30px; // 30
@@ -106,13 +108,15 @@ export default {
             font-weight: 400;
             line-height: 50px;
             font-size: 18px; // 18
-            width: 300px;
+            width: 100%;
             font-family: '微软雅黑';
             vertical-align: middle;
             position: relative; /* 相对定位以便绝对定位子元素 */
             white-space: nowrap; // 防止换行
             overflow: hidden; // 隐藏溢出部分
-            width: calc(100% - 38px);
+            width: calc(100%);
+            text-align: center;
+            padding-left: 0 !important;
         }
     }
 

+ 1 - 1
src/views/index.vue

@@ -764,7 +764,7 @@ export default {
         init() {
             if (this.$store.state.user.roles.includes('admin') || this.$store.state.user.roles.includes('manager') || this.$store.state.user.dept.userName === 'fastbee') {
                 this.isAdmin = true;
-                this.getServer();
+                // this.getServer();
                 this.getChartData();
             }
         },