const customRouteBuilder = (customRouteContext) => {
const {
primaryAnimation,
} = customRouteContext
const handlePrimaryAnimation = () => {
'worklet'
console.log(1231231, primaryAnimation.value)
console.log(321321321, customRouteContext)
return {
opacity: primaryAnimation.value
}
}
return {
opaque: false, // 是否显示前一个页面
handlePrimaryAnimation, // 设置页面透明度变化
canTransitionFrom: false, 取消前一个页面向左推入的动画
}
}
onLoad(() => {
wx.router.addRouteBuilder('customRoute', customRouteBuilder)
})
const goGenerate = () => {
uni.navigateTo({
url: `/pages/drawPictureSelector/drawPictureSelector`,
routeType: 'customRoute'
})
}
![c***@163.com](https://img-cdn-tc.dcloud.net.cn/account/identicon/45a5d4a4573e36efdf5bfd10dde66535.png)
c***@163.com
- 发布:2023-09-14 16:04
- 更新:2023-09-19 20:49
- 阅读:404
![](http://img-cdn-tc.dcloud.net.cn/uploads/questions/20230914/73c86a72fcbc0e07fff18924db69c735.png)
![](http://img-cdn-tc.dcloud.net.cn/uploads/questions/20230914/5db7b95b4eb3d895f17fb981d98f5ad1.png)