chenjun

18497图集详情页,图片上滑或下滑,返回上一页面,页面退出效果明显,参考视频中安卓退出效果

... ... @@ -24,6 +24,13 @@ export struct MultiPictureListPage {
@Provide topSafeHeight: number = AppStorage.get<number>('topSafeHeight') || 0
// @Provide bgc: Color = Color.White;
@Provide duration: number = 0
@State noAnimation: boolean = true
pageTransition() {
// PageTransitionEnter({ duration: this.noAnimation ? 0 : 300 })
PageTransitionExit({ duration: !this.noAnimation ? 0 : 300 })
}
aboutToAppear(): void {
//获取宽高尺寸
... ... @@ -65,6 +72,7 @@ export struct MultiPictureListPage {
})
.onClick(() => {
this.onBack();
this.noAnimation = false
router.back();
})
.id("backImg")
... ...