refactor: 移除hero水墨动画,优化全局样式与组件细节
This commit is contained in:
@@ -35,7 +35,7 @@ export function BackToTop() {
|
||||
exit={shouldReduceMotion ? {} : { opacity: 0, y: 20, scale: 0.8 }}
|
||||
transition={{ duration: 0.2, ease: 'easeOut' }}
|
||||
onClick={scrollToTop}
|
||||
className="fixed bottom-8 right-8 z-50 p-3 bg-[#C41E3A] text-white rounded-full shadow-lg hover:bg-[#A01830] hover:shadow-xl transition-all duration-200 focus:outline-none focus:ring-2 focus:ring-[#C41E3A] focus:ring-offset-2"
|
||||
className="fixed right-4 bottom-20 md:bottom-8 md:right-8 z-40 p-3 bg-[#C41E3A] text-white rounded-full shadow-lg hover:bg-[#A01830] hover:shadow-xl transition-all duration-200 focus:outline-none focus:ring-2 focus:ring-[#C41E3A] focus:ring-offset-2"
|
||||
aria-label="返回顶部"
|
||||
title="返回顶部"
|
||||
style={{
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
'use client';
|
||||
|
||||
import { useReducer } from 'react';
|
||||
import { useReducer, useEffect } from 'react';
|
||||
import { motion, AnimatePresence } from 'framer-motion';
|
||||
|
||||
interface FlipCardProps {
|
||||
@@ -93,7 +93,9 @@ function FlipCard({ value, label, maxDigits = 2 }: FlipCardProps) {
|
||||
},
|
||||
{ current: value, previous: value }
|
||||
);
|
||||
dispatch(value);
|
||||
useEffect(() => {
|
||||
dispatch(value);
|
||||
}, [value]);
|
||||
|
||||
const formatNumber = (num: number) => {
|
||||
const str = num.toString().padStart(maxDigits, '0');
|
||||
|
||||
Reference in New Issue
Block a user