wenhongquan há 3 anos atrás
pai
commit
c69b9aa2eb
2 ficheiros alterados com 54 adições e 54 exclusões
  1. 50 52
      src/layout/BaseLayout/index.scss
  2. 4 2
      src/views/HomePage/index.tsx

+ 50 - 52
src/layout/BaseLayout/index.scss

@@ -1,55 +1,53 @@
 .base-layout-container {
-  header {
-    width: 100%;
-    height: 60px;
-    background: #003a8c;
-    box-shadow: 0px 1px 4px 0px rgba(0, 21, 41, 0.12);
-    box-sizing: border-box;
-    display: flex;
-    justify-content: space-between;
-    padding: 0 14px 0 30px;
-    align-items: center;
-    position: sticky;
-    top: 0;
-    z-index: 2001;
-    background-image: url('../../assets/bg_jgxt.jpg');
-    background-repeat: no-repeat;
-
-    .title-content {
-      display: flex;
-      align-items: center;
-      flex: 1;
-    }
-
-    .title {
-      font-size: 24px;
-      font-family: PingFangSC, PingFangSC-Semibold;
-      font-weight: 600;
-      text-align: left;
-      color: #ffffff;
-      line-height: 60px;
-      margin-right: 10px;
-    }
-    .action {
-      display: flex;
-      align-items: center;
-      color: #ffffff;
-      > span {
-        padding-right: 14px;
-      }
-      .el-icon {
-        padding: 10px;
-        cursor: pointer;
-        transition: color 0.3s;
-        &:hover {
-          color: #f0f0f0;
+    header {
+        width: 100%;
+        height: 60px;
+        background: #003a8c;
+        box-shadow: 0px 1px 4px 0px rgba(0, 21, 41, 0.12);
+        box-sizing: border-box;
+        display: flex;
+        justify-content: space-between;
+        padding: 0 14px 0 30px;
+        align-items: center;
+        position: sticky;
+        top: 0;
+        z-index: 2001;
+        background-image: url('../../assets/bg_jgxt.jpg');
+        background-repeat: no-repeat;
+        .title-content {
+            display: flex;
+            align-items: center;
+            flex: 1;
+        }
+        .title {
+            font-size: 24px;
+            font-family: PingFangSC, PingFangSC-Semibold;
+            font-weight: 600;
+            text-align: left;
+            color: #ffffff;
+            line-height: 60px;
+            margin-right: 10px;
         }
-      }
+        .action {
+            display: flex;
+            align-items: center;
+            color: #ffffff;
+            >span {
+                padding-right: 14px;
+            }
+            .el-icon {
+                padding: 10px;
+                cursor: pointer;
+                transition: color 0.3s;
+                &:hover {
+                    color: #f0f0f0;
+                }
+            }
+        }
+    }
+    main {
+        display: flex;
+        flex-direction: column;
+        min-height: calc(100vh - 60px);
     }
-  }
-  main {
-    display: flex;
-    flex-direction: column;
-    min-height: calc(100vh - 60px);
-  }
-}
+}

+ 4 - 2
src/views/HomePage/index.tsx

@@ -149,7 +149,7 @@ export default defineComponent({
           v-slots={{ right: () => <Icon name="plus" /> }}
           style={{ zIndex: 2 }}
         />
-        <div style={{ position: 'sticky', zIndex: 1 }}>
+        <div style={{ position: 'fixed',zIndex:1,width:"100%" }}>
           <DropdownMenu>
             <DropdownItem
               v-model={incidentType.value}
@@ -162,7 +162,9 @@ export default defineComponent({
         <PullRefresh
           onRefresh={handleRefresh}
           v-model={refreshLoading.value}
-          successText="刷新成功">
+          successText="刷新成功"
+          style="margin-top: 60px;"
+        >
           <div class="home-content">
             <List
               v-model:loading={listLoading.value}