From f5d2fd0062cac19c2a9227b4f23b3643b8613860 Mon Sep 17 00:00:00 2001 From: landaiqing <3517283258@qq.com> Date: Sun, 5 May 2024 21:32:59 +0800 Subject: [PATCH] feat: update --- src/components/HomeIndex/index.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/HomeIndex/index.tsx b/src/components/HomeIndex/index.tsx index 41b8862..1563688 100644 --- a/src/components/HomeIndex/index.tsx +++ b/src/components/HomeIndex/index.tsx @@ -6,7 +6,7 @@ import SvgIcon from '@/components/SvgIcon/SvgIcon.tsx' const HomeIndex: React.FC = () => { useEffect(() => { document.body.classList.add('body') - setTimeout(() => { + window.onload = function () { if (!CSS.supports('animation-timeline: scroll()')) { // const SPAN = 'max(45vw, 260px)'; const CONFIG = [ @@ -190,7 +190,7 @@ const HomeIndex: React.FC = () => { }, }) } - }, 1000) + } return () => { document.body.classList.remove('body')