u
This commit is contained in:
1 parent
d6dd5b032d
commit
8a6d29f5d0
16 files changed
+514
-69
No files matched your search
@@ -1,5 +1,6 @@
|
||||
import { Ionicons } from '@expo/vector-icons'
|
||||
import { usePathname, useRouter } from 'expo-router'
|
||||
import { useRef } from 'react'
|
||||
import { Image, Pressable, Text, View } from 'react-native'
|
||||
import Animated, { SlideInLeft, SlideInRight } from 'react-native-reanimated'
|
||||
import { SafeAreaView } from 'react-native-safe-area-context'
|
||||
@@ -31,7 +32,15 @@ export default function StepLayout({ steps, children, showHearder = true }: Step
|
||||
// 是否显示header
|
||||
const headerVisible = showHearder !== false && currentStep.showHearder !== false
|
||||
|
||||
const enteringAnimation = canGoBack ? SlideInRight.duration(300) : SlideInLeft.duration(300)
|
||||
const hasMounted = useRef(false)
|
||||
|
||||
const enteringAnimation = hasMounted.current
|
||||
? canGoBack
|
||||
? SlideInRight.duration(300)
|
||||
: SlideInLeft.duration(300)
|
||||
: undefined
|
||||
|
||||
hasMounted.current = true
|
||||
|
||||
return (
|
||||
<SafeAreaView style={{ flex: 1 }}>
|
||||
|
||||
Reference in new issue
Block a user