怎么修改页面切换的动画。。?
chunmu opened this issue · comments
//这段动画组织的代码 我不知道外层怎么输入动画配置信息。。?
configureScene(route) {
if (route.query) {
if (route.query.anim === 'floatFromBottom') {
return Platform.OS === 'android' ?
Navigator.SceneConfigs.FloatFromBottomAndroid : Navigator.SceneConfigs.FloatFromBottom;
}
if (Platform.OS === 'ios' && route.query.anim === 'floatFromLeft') {
return Navigator.SceneConfigs.FloatFromLeft;
}
if (Platform.OS === 'ios' && route.query.anim === 'floatFromRight') {
return Navigator.SceneConfigs.FloatFromRight;
}
if (Platform.OS === 'ios' && route.query.anim === 'pushFromRight') {
return Navigator.SceneConfigs.PushFromRight;
}
}
return Platform.OS === 'android' ?
Navigator.SceneConfigs.FloatFromBottomAndroid : Navigator.SceneConfigs.FloatFromRight;
}
URL例如 /login
,指定动画方式可以写作/login?anim=floatFromBottom
,利用react-router进行参数传递的。
哦哦 ok 谢啦