diff --git a/src/directives/tween-animation.ts b/src/directives/tween-animation.ts index 9841ca3..3d12db2 100644 --- a/src/directives/tween-animation.ts +++ b/src/directives/tween-animation.ts @@ -1,13 +1,14 @@ import { gsap, } from 'gsap' import { ScrollTrigger } from 'gsap/ScrollTrigger' export default { - name: 'tween-animation', - mounted(el: HTMLElement) { + name: 'tween-Y', + mounted(el: HTMLElement, binding: any) { + const params = binding.value // if(!binding.value.isGsap)return let dom = document.querySelector('body') gsap.registerPlugin(ScrollTrigger); let tl1 = gsap.timeline(); - tl1.from(el,1, {y:'30px',opacity:0},) + tl1.from(el,1, {y:params || '30px',opacity:0},) ScrollTrigger.create({ trigger: el, // 触发器元素 start: "top 90%", // 滚动触发器的起始滚动位置 @@ -15,7 +16,7 @@ export default { markers: false, // 开启标注功能 animation:tl1, scroller:dom,//设置指定元素为滚动依据 - scrub:2, + scrub:false, // toggleActions: "play reset play reset", // onUpdate:(v)=>{ // if(v.progress < 0.1){ diff --git a/src/pages/about-us/ecosystem.vue b/src/pages/about-us/ecosystem.vue index 85be8f9..1bba77d 100644 --- a/src/pages/about-us/ecosystem.vue +++ b/src/pages/about-us/ecosystem.vue @@ -64,6 +64,7 @@ position: relative; > img{ width: 100%; + height: 675px; } > .icon-bofang{ font-size: 100px; diff --git a/src/pages/about-us/index.vue b/src/pages/about-us/index.vue index 55225b9..49178a6 100644 --- a/src/pages/about-us/index.vue +++ b/src/pages/about-us/index.vue @@ -3,6 +3,7 @@ import Ecosystem from './ecosystem.vue' import Title from './title.vue' import Mission from './mission.vue' import OurTeam from './our-team.vue' +import StrategicPartners from './strategic-partners.vue' defineExpose({}) \ No newline at end of file