注意 CardStyleInterpolators 导入的地址是
import {CardStyleInterpolators} from 'react-navigation-stack/src/vendor/index'
使用
{
// initialRouteName: 'CustomerFilePage',
headerMode: 'screen',
defaultNavigationOptions: {
headerStyle: {
backgroundColor: themeColor.textColor0,
},
cardStyleInterpolator: CardStyleInterpolators.forHorizontalIOS, // 切换路由时水平动画
headerTitleStyle: {
fontSize: 18,
color: themeColor.titleColor,
textAlign: 'center',
},
headerTitleAlign: 'center',
headerBackTitleStyle: {
textAlign: 'center',
},
headerLeft: () => <NavigationHeaderLeftComponent/>,
headerRight: () => <NavigationHeaderRightComponent/>,
// headerBackTitle: '返回',
// headerBackTitleStyle: {
// color: themeColor.titleColor,
// },
// headerBackImage: {
// tintColor: themeColor.titleColor,
// },
// headerTitleAlign: 'center',
},
},