Merge branch 'main' of http://18.167.251.121:10003/aidlab/Code-Create
This commit is contained in:
@@ -33,7 +33,7 @@ export default {
|
||||
rootMap.set(obj.root, [obj])
|
||||
obj.root.addEventListener('scroll', handleScroll)
|
||||
},
|
||||
beforeUnmount(el: HTMLElement, binding: any) {
|
||||
beforeUnmount(el: HTMLElement) {
|
||||
rootMap.forEach((objs, root) => {
|
||||
if (objs.some((v: any) => v.el === el)) {
|
||||
objs = objs.filter((v_: any) => v_.el !== el)
|
||||
@@ -60,4 +60,4 @@ function handleScroll(e: any) {
|
||||
obj.el.classList.toggle('active', isActive)
|
||||
}
|
||||
})
|
||||
};
|
||||
};
|
||||
|
||||
@@ -2,7 +2,7 @@ import { gsap, } from 'gsap'
|
||||
import { ScrollTrigger } from 'gsap/ScrollTrigger'
|
||||
export default {
|
||||
name: 'tween-animation',
|
||||
mounted(el: HTMLElement, binding: any) {
|
||||
mounted(el: HTMLElement) {
|
||||
// if(!binding.value.isGsap)return
|
||||
let dom = document.querySelector('body')
|
||||
gsap.registerPlugin(ScrollTrigger);
|
||||
@@ -26,4 +26,4 @@ export default {
|
||||
// }
|
||||
});
|
||||
},
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user