This commit is contained in:
oneao committed 2026-01-29 22:54:15 +08:00
1 parent 295b3306a3
commit c62c9d080b
8 files changed
+878 -136

No files matched your search

+21 -40
View File
@@ -1,17 +1,6 @@
import { DateRangePicker } from '@yz1311/react-native-wheel-picker'
import React from 'react'
import { Button, ButtonText } from '@/components/ui/button'
import {
Drawer,
DrawerBackdrop,
DrawerBody,
DrawerCloseButton,
DrawerContent,
DrawerFooter,
DrawerHeader,
} from '@/components/ui/drawer'
import { Heading } from '@/components/ui/heading'
import { CloseIcon, Icon } from '@/components/ui/icon'
import { Text } from '@/components/ui/text'
export default function Example() {
const [showDrawer, setShowDrawer] = React.useState(false)
@@ -21,39 +10,31 @@ export default function Example() {
onPress={() => {
setShowDrawer(true)
}}
className="mt-10"
>
<ButtonText>Open Drawer</ButtonText>
</Button>
<Drawer
isOpen={showDrawer}
anchor="bottom"
size="lg"
onClose={() => {
<DateRangePicker
pickerTitle="预约时间"
pickerCancelBtnText="取消"
pickerConfirmBtnText="确认"
// 开启modal模式
isModal={true}
// 可以自定义modal的一些属性
modalProps={{
}}
modalVisible={showDrawer}
// modalVisible回调函数
onModalVisibleChange={(visible) => {
}}
onPickerCancel={() => {
}}
onPickerConfirm={(date) => {
setShowDrawer(false)
}}
>
<DrawerBackdrop />
<DrawerContent>
<DrawerHeader>
<Text>取消</Text>
<Text>分类设置</Text>
<Text>确认</Text>
</DrawerHeader>
<DrawerBody>
<Text>This is the basic drawer component.</Text>
</DrawerBody>
<DrawerFooter>
<Button
variant="outline"
onPress={() => {
setShowDrawer(false)
}}
>
<ButtonText>Cancel</ButtonText>
</Button>
</DrawerFooter>
</DrawerContent>
</Drawer>
/>
</>
)
}
@@ -1,5 +1,5 @@
import { useFocusEffect, useRouter } from 'expo-router'
import React, { useCallback, useEffect, useState } from 'react'
import React, { useCallback, useState } from 'react'
import { Image, Text, TouchableOpacity, View } from 'react-native'
import { SafeAreaView, useSafeAreaInsets } from 'react-native-safe-area-context'
import { ADatePicker, ADrawer, AListItem, LucideIcon } from '@/components/common/ao'
@@ -84,7 +84,6 @@ export default function Money() {
>
<LucideIcon icon="Menu" size={24} clickable={false} />
</TouchableOpacity>
</View>
<View
@@ -208,6 +207,7 @@ export default function Money() {
text="类别设置"
onPress={() => {
router.navigate('/money/category/setting')
setShowActionsMenu(false)
}}
/>
</View>
@@ -217,7 +217,14 @@ export default function Money() {
<Text className="text-gray-600 font-semibold text-sm">统计分析</Text>
<View className="p-1">
<AListItem icon="ChartSpline" text="图表分析" />
<AListItem
icon="ChartSpline"
text="图表分析"
onPress={() => {
router.navigate('/money/analysis')
setShowActionsMenu(false)
}}
/>
</View>
</View>
</SafeAreaView>