zs 1 month ago
parent
commit
d39d0231d7
2 changed files with 13 additions and 11 deletions
  1. 3 2
      src/views/win/introduceDetail.vue
  2. 10 9
      src/views/win/messDetailSec.vue

+ 3 - 2
src/views/win/introduceDetail.vue

@@ -84,12 +84,13 @@ function useWindowScroll() {
       }
       .zero {
         margin: 0 0 40px 0;
+        padding: 0 17%;
       }
     }
-    
+
     .bottom {
       .zero {
-        margin: 0 0 40px 0;
+        margin: 40px 0;
       }
     }
   }

+ 10 - 9
src/views/win/messDetailSec.vue

@@ -33,21 +33,21 @@ const info = ref({ title: '用水发展', enTitle: 'DEVELOP' })
 const { y } = useWindowScroll()
 
 function useWindowScroll() {
-  const y = ref(0);
+  const y = ref(0)
 
   const handleScroll = () => {
-    y.value = window.scrollY;
-  };
+    y.value = window.scrollY
+  }
 
   onMounted(() => {
-    window.addEventListener('scroll', handleScroll);
-  });
+    window.addEventListener('scroll', handleScroll)
+  })
 
   onUnmounted(() => {
-    window.removeEventListener('scroll', handleScroll);
-  });
+    window.removeEventListener('scroll', handleScroll)
+  })
 
-  return { y };
+  return { y }
 }
 </script>
 
@@ -77,10 +77,11 @@ function useWindowScroll() {
         padding: 0 17%;
       }
     }
-        .bottom {
+    .bottom {
       margin: 40px 0 0 0;
       .zero {
         margin: 0 0 40px 0;
+        padding: 0 17%;
       }
     }
   }