wangxl@jiinfo.cn il y a 1 mois
Parent
commit
df12d392b9

+ 3 - 0
src/components/homeHeader.vue

@@ -111,6 +111,9 @@ export default {
   }
 
   .header_app {
+    position: sticky;
+    top: 0;
+    z-index: 9999;
     .back-clor {
       width: 100%;
       background-color: #fff;

+ 1 - 1
src/components/tableList.vue

@@ -896,7 +896,7 @@ export default {
   }
   .th_head{
     position: sticky;
-    top: 118px;
+    top: 198px;
     z-index: 9999;
   }
   .tableList_td {

+ 9 - 3
src/view/overView/index.vue

@@ -74,7 +74,8 @@ export default {
       keywordList: [], // 搜索数组
       otherList: [], // 
       // 是否搜索
-      issshow: false
+      issshow: false,
+      showBackToTop: false,
     };
   },
   methods: {
@@ -104,6 +105,8 @@ export default {
       return array.some(b => b.catalog === block.catalog || b.name === block.name || b.target === block.target || b.moa === block.moa);
     },
     search() {
+      // 回到顶部
+      document.body.scrollTop = 0;
       const keyword = this.keyword.trim().toLowerCase();
       this.keywordList = []
       this.issshow = true
@@ -144,9 +147,12 @@ export default {
       this.$router.push({
         path: "/products/" + title + "/" + name + "/" + item.catalog
       });
+    },
+    handleScroll() {
+      // 当滚动距离超过 300px 时显示回到顶部按钮
+      this.showBackToTop = window.scrollY > 300; 
     }
   },
-  mounted() { },
   created() {
     this.changeSearchAll()
   }
@@ -171,7 +177,7 @@ export default {
       align-items: center;
       background-color: #fff;
       position: sticky;
-      top: 0;
+      top: 80px;
       z-index: 999;;
       .keyword_box {
         width: 50%;

+ 2 - 2
src/view/product/index.vue

@@ -177,9 +177,9 @@ export default {
   .demo-form-inline{
     padding-top: 40px;
     position: sticky;
-    top: 0;
+    top: 80px;
     background: #fff;
-    z-index: 9999;
+    z-index: 999;
     display: flex;
     align-self: center;
   }