From 465d5350f34a35cb1af2c077eee732edcd8fbc9a Mon Sep 17 00:00:00 2001 From: richarjiang Date: Fri, 29 Aug 2025 21:27:29 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20=E6=B3=A8=E9=87=8A=E6=8E=89?= =?UTF-8?q?=E6=B5=AE=E5=8A=A8=E5=8D=A1=E7=89=87=E5=8A=A8=E7=94=BB=E9=80=BB?= =?UTF-8?q?=E8=BE=91=EF=BC=8C=E8=B0=83=E6=95=B4=E6=A0=B7=E5=BC=8F=E4=BB=A5?= =?UTF-8?q?=E5=A2=9E=E5=BC=BA=E8=A7=86=E8=A7=89=E6=95=88=E6=9E=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/(tabs)/statistics.tsx | 42 ++++++++++++++++++++------------------ components/StressMeter.tsx | 1 + 2 files changed, 23 insertions(+), 20 deletions(-) diff --git a/app/(tabs)/statistics.tsx b/app/(tabs)/statistics.tsx index 31f85ca..ee4568b 100644 --- a/app/(tabs)/statistics.tsx +++ b/app/(tabs)/statistics.tsx @@ -42,27 +42,27 @@ const FloatingCard = ({ children, delay = 0, style }: { }) => { const floatAnim = useRef(new Animated.Value(0)).current; - useEffect(() => { - const startAnimation = () => { - Animated.loop( - Animated.sequence([ - Animated.timing(floatAnim, { - toValue: 1, - duration: 3000, - delay: delay, - useNativeDriver: true, - }), - Animated.timing(floatAnim, { - toValue: 0, - duration: 3000, - useNativeDriver: true, - }), - ]) - ).start(); - }; + // useEffect(() => { + // const startAnimation = () => { + // Animated.loop( + // Animated.sequence([ + // Animated.timing(floatAnim, { + // toValue: 1, + // duration: 3000, + // delay: delay, + // useNativeDriver: true, + // }), + // Animated.timing(floatAnim, { + // toValue: 0, + // duration: 3000, + // useNativeDriver: true, + // }), + // ]) + // ).start(); + // }; - startAnimation(); - }, [floatAnim, delay]); + // startAnimation(); + // }, [floatAnim, delay]); const translateY = floatAnim.interpolate({ inputRange: [0, 1], @@ -730,6 +730,8 @@ const styles = StyleSheet.create({ shadowOpacity: 0.12, shadowRadius: 12, elevation: 6, + minHeight: 100, + justifyContent: 'center', }, basalMetabolismCardOverride: { margin: -16, // 抵消 masonryCard 的 padding diff --git a/components/StressMeter.tsx b/components/StressMeter.tsx index 61bc8d3..d7bd12a 100644 --- a/components/StressMeter.tsx +++ b/components/StressMeter.tsx @@ -112,6 +112,7 @@ export function StressMeter({ value, updateTime, style, hrvValue }: StressMeterP const styles = StyleSheet.create({ container: { + flex: 1, shadowColor: '#000', shadowOffset: { width: 0,