Browse Source

fix: 命名标准化

Lee 2 ngày trước cách đây
mục cha
commit
658864b331

+ 2 - 2
app/components/section/Ability.vue

@@ -3,7 +3,7 @@
     id="ability"
     ref="abilityRef"
     class="ability transition-all duration-1000 ease-out"
-    :class="[isVisible ? 'opacity-100 translate-y-0' : 'opacity-0 translate-y-100px']"
+    :class="[isAbilityVisible ? 'opacity-100 translate-y-0' : 'opacity-0 translate-y-20px']"
   >
     <div class="ability-title pf-sc-semibold">一体化智慧解决方案</div>
     <div class="ability-desc pf-sc-regular">
@@ -58,7 +58,7 @@
   import { abilityTabs, abilities } from '@/constants/common'
 
   const abilityRef = ref<HTMLElement | null>(null)
-  const { isVisible } = useScrollReveal(abilityRef)
+  const { isVisible: isAbilityVisible } = useScrollReveal(abilityRef)
 
   const activeAbilityTab = ref<AbilityTab>(abilityTabs[0] as AbilityTab)
 

+ 2 - 2
app/components/section/Partnership.vue

@@ -10,7 +10,7 @@
     id="partnership"
     ref="partnershipRef"
     class="partnership transition-all duration-1000 ease-out"
-    :class="[isVisible ? 'opacity-100 translate-y-0' : 'opacity-0 translate-y-100px']"
+    :class="[isPartnershipVisible ? 'opacity-100 translate-y-0' : 'opacity-0 translate-y-20px']"
   >
     <div class="partnership-header">
       <div class="partnership-line-left"></div>
@@ -38,7 +38,7 @@
 <script setup lang="ts">
   import { partnersRow1, partnersRow2 } from '@/constants/common'
   const partnershipRef = ref<HTMLElement | null>(null)
-  const { isVisible } = useScrollReveal(partnershipRef)
+  const { isVisible: isPartnershipVisible } = useScrollReveal(partnershipRef)
 </script>
 
 <style scoped lang="scss">

+ 3 - 21
app/pages/about/components/about.vue

@@ -2,7 +2,7 @@
  * @Author: LiZhiWei
  * @Date: 2026-01-21 08:51:46
  * @LastEditors: LiZhiWei
- * @LastEditTime: 2026-01-22 08:26:30
+ * @LastEditTime: 2026-01-22 10:58:19
  * @Description: 
 -->
 <template>
@@ -99,10 +99,9 @@
     { label: '账单资金', value: '15亿/年' },
   ]
 
-  const isAboutVisible = ref(false)
   const isVideoPlaying = ref(false)
-  const aboutRef = ref(null)
-
+  const aboutRef = ref<HTMLElement | null>(null)
+  const { isVisible: isAboutVisible } = useScrollReveal(aboutRef)
   const playVideo = () => {
     isVideoPlaying.value = true
   }
@@ -110,23 +109,6 @@
   const closeVideo = () => {
     isVideoPlaying.value = false
   }
-
-  onMounted(() => {
-    const observer = new IntersectionObserver(
-      (entries) => {
-        entries.forEach((entry) => {
-          if (!entry.isIntersecting) return
-          isAboutVisible.value = true
-          observer.unobserve(entry.target)
-        })
-      },
-      { threshold: 0.1 }
-    )
-
-    if (aboutRef.value) {
-      observer.observe(aboutRef.value)
-    }
-  })
 </script>
 
 <style scoped lang="scss">