refactor(layouts): 移除ArcticNewOneFooter中未使用的动画函数
This commit is contained in:
@@ -19,32 +19,6 @@ const pagesLinks = [
|
|||||||
{ name: 'nav.news', url: '/news' },
|
{ name: 'nav.news', url: '/news' },
|
||||||
]
|
]
|
||||||
|
|
||||||
const onTalkHover = () => {
|
|
||||||
if (!talkBtnRef.value) return
|
|
||||||
const origs = talkBtnRef.value.querySelectorAll('.btn-char-orig')
|
|
||||||
const clones = talkBtnRef.value.querySelectorAll('.btn-char-clone')
|
|
||||||
const bg = talkBtnRef.value.querySelector('.btn-bg-hover')
|
|
||||||
|
|
||||||
// 背景从底部滑入 (yPercent: 100 -> 0)
|
|
||||||
gsap.to(bg, { yPercent: 0, duration: 0.4, ease: 'power3.out', overwrite: true })
|
|
||||||
|
|
||||||
gsap.to(origs, { yPercent: -100, duration: 0.4, stagger: { amount: 0.2, from: 'start' }, ease: 'power3.out', overwrite: true })
|
|
||||||
gsap.to(clones, { yPercent: 0, duration: 0.4, stagger: { amount: 0.2, from: 'start' }, ease: 'power3.out', overwrite: true })
|
|
||||||
}
|
|
||||||
|
|
||||||
const onTalkLeave = () => {
|
|
||||||
if (!talkBtnRef.value) return
|
|
||||||
const origs = talkBtnRef.value.querySelectorAll('.btn-char-orig')
|
|
||||||
const clones = talkBtnRef.value.querySelectorAll('.btn-char-clone')
|
|
||||||
const bg = talkBtnRef.value.querySelector('.btn-bg-hover')
|
|
||||||
|
|
||||||
// 背景向下反向滑出回收 (yPercent: 0 -> 100)
|
|
||||||
gsap.to(bg, { yPercent: 100, duration: 0.4, ease: 'power3.out', overwrite: true })
|
|
||||||
|
|
||||||
gsap.to(origs, { yPercent: 0, duration: 0.4, stagger: { amount: 0.2, from: 'end' }, ease: 'power3.out', overwrite: true })
|
|
||||||
gsap.to(clones, { yPercent: 100, duration: 0.4, stagger: { amount: 0.2, from: 'end' }, ease: 'power3.out', overwrite: true })
|
|
||||||
}
|
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
if (!footerRef.value) return
|
if (!footerRef.value) return
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user