import type { LayoutChangeEvent } from 'react-native' import { LinearGradient } from 'expo-linear-gradient' import React, { useRef, useState } from 'react' import { Text, View } from 'react-native' import { useSafeAreaInsets } from 'react-native-safe-area-context' import { LucideIcon } from '@/components/common/ao' import { IconJiaotong } from '@/components/iconfont' import { Grid, GridItem } from '@/components/ui/grid' import { Progress, ProgressFilledTrack } from '@/components/ui/progress' export default function Money() { const insets = useSafeAreaInsets() const [gradientHeight, setGradientHeight] = useState(200) // 默认渐变高度 const gridLayout = useRef({ y: 0, height: 0 }) const onGridLayout = (e: LayoutChangeEvent) => { const { y, height } = e.nativeEvent.layout gridLayout.current = { y, height } setGradientHeight(y + height / 2 + 16 + insets.top) } return ( {/* 页面内容 */} 2025/11/10 余额 ↑20% 22313.00 收入 ↑20% 11.0 支出 ↑20% 11.0 结余 ↑20% 11.0 预算 点击设置 {[...Array.from({ length: 5 })].map((_, i) => ( 账单 ))} ) }