uniapp如何设置page或组件的入场出场动画过渡效果?
网友回复
1、page入场动画可以在uni.navigateTo设置
uni.navigateTo({ url: '../test/test', animationType: 'pop-in', animationDuration: 200 }); uni.navigateBack({ delta: 1, animationType: 'pop-out', animationDuration: 200 });还可在navigator标签中使用
<navigator animation-type="pop-in" animation-duration="300" url="../test/test">navigator</navigator> <navigator animation-type="pop-out" animation-duration="300" open-type="navigateBack" >navigator</navigator>11也能在pages.json中使用
"style": { "app-plus": { "animationType": "fade-in", "animationDuration": 300 } }

2、组件动画可以使用uni.createAnimation(OBJECT)实现
点击查看剩余70%