Ver Fonte

style: 调整首页布局样式

yusheng há 2 meses atrás
pai
commit
fa1616f5e6
1 ficheiros alterados com 11 adições e 11 exclusões
  1. 11 11
      src/views/home/index.vue

+ 11 - 11
src/views/home/index.vue

@@ -483,9 +483,8 @@
       },
       syncHeaderWidth() {
         this.$nextTick(() => {
-          const threeColumnLayout = document.querySelector(
-            '.two-column-layout'
-          );
+          const threeColumnLayout =
+            document.querySelector('.two-column-layout');
           const headerSection = document.querySelector('.header-section');
           if (threeColumnLayout && headerSection) {
             const layoutWidth = threeColumnLayout.scrollWidth;
@@ -846,7 +845,6 @@
       padding: 0 20px;
       position: relative;
       z-index: 10;
-      min-width: 2200px;
 
       .logo {
         // width: 200px;
@@ -1286,18 +1284,19 @@
           display: flex;
           align-items: center;
           height: calc(100% - 35px);
-          gap: 20px;
+          // gap: 20px;
 
           // 左侧数据卡片区域
           .alert-cards {
             width: 50%;
             height: 100%;
-            display: grid;
-            grid-template-columns: repeat(2, 1fr);
-            grid-template-rows: repeat(3, 1fr);
-            gap: 12px;
+            display: flex;
+            flex-wrap: wrap;
+            justify-content: space-around;
+            align-items: center;
 
             .alert-card-item {
+              width: 42%;
               // background: linear-gradient(
               //   135deg,
               //   rgba(20, 50, 105, 0.9) 0%,
@@ -1309,6 +1308,7 @@
                 height: 35px;
                 background: url('~@/assets/pcs/icon.png') no-repeat center top;
                 background-size: 100% 100%;
+                margin-right: 15px;
               }
               border-radius: 6px;
               display: flex;
@@ -1321,10 +1321,10 @@
               align-items: center;
               // justify-content: center;
               padding-left: 15px;
-              gap: 8px;
+              // gap: 8px;
               position: relative;
               overflow: hidden;
-              height: 60px;
+              height: 30%;
               background: url('~@/assets/pcs/leftItem.png') no-repeat center top;
               background-size: 100% 100%;