diff --git a/web/src/components/LandingPage.tsx b/web/src/components/LandingPage.tsx index 0e8a2d4c..c715b63a 100644 --- a/web/src/components/LandingPage.tsx +++ b/web/src/components/LandingPage.tsx @@ -381,24 +381,6 @@ export function LandingPage() { /> - -
- 24/7 -
-
- 自动交易 -
-
@@ -519,15 +501,16 @@ export function LandingPage() { @@ -940,33 +923,6 @@ export function LandingPage() { ) } -// Helper Components -function FloatingCard({ children, delay, position, color }: any) { - return ( - { - acc[key] = position[key] + 'rem' - return acc - }, {}), - }} - initial={{ opacity: 0, scale: 0 }} - animate={{ opacity: 1, scale: 1 }} - transition={{ delay, type: 'spring', stiffness: 260, damping: 20 }} - whileHover={{ scale: 1.1, rotate: 5 }} - > - {children} - - ) -} - function AnimatedSection({ children, id, diff --git a/web/src/components/Typewriter.tsx b/web/src/components/Typewriter.tsx index e8e33349..acab982f 100644 --- a/web/src/components/Typewriter.tsx +++ b/web/src/components/Typewriter.tsx @@ -5,15 +5,17 @@ interface TypewriterProps { typingSpeed?: number // 毫秒/字符 lineDelay?: number // 每行结束的额外等待 className?: string + style?: React.CSSProperties } export default function Typewriter({ lines, - typingSpeed = 25, - lineDelay = 400, + typingSpeed = 50, + lineDelay = 600, className, + style, }: TypewriterProps) { - const [text, setText] = useState('') + const [typedLines, setTypedLines] = useState(['']) const [showCursor, setShowCursor] = useState(true) const lineIndexRef = useRef(0) const charIndexRef = useRef(0) @@ -24,15 +26,19 @@ export default function Typewriter({ function typeNext() { const currentLine = lines[lineIndexRef.current] ?? '' if (charIndexRef.current < currentLine.length) { - setText((t) => t + currentLine[charIndexRef.current]) + setTypedLines((prev) => { + const next = [...prev] + next[next.length - 1] = (next[next.length - 1] || '') + currentLine[charIndexRef.current] + return next + }) charIndexRef.current += 1 timerRef.current = window.setTimeout(typeNext, typingSpeed) } else { // 行结束 if (lineIndexRef.current < lines.length - 1) { - setText((t) => t + '\n') lineIndexRef.current += 1 charIndexRef.current = 0 + setTypedLines((prev) => [...prev, '']) timerRef.current = window.setTimeout(typeNext, lineDelay) } else { // 最后一行输入完毕 @@ -55,8 +61,8 @@ export default function Typewriter({ }, [lines, typingSpeed, lineDelay]) return ( -
-      {text}
+    
+      {typedLines.join('\n')}
       
     
)