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
- 发布:2023-09-14 16:04
- 更新:2023-09-19 20:49
- 阅读:516