chenjun

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

@@ -24,6 +24,13 @@ export struct MultiPictureListPage { @@ -24,6 +24,13 @@ export struct MultiPictureListPage {
24 @Provide topSafeHeight: number = AppStorage.get<number>('topSafeHeight') || 0 24 @Provide topSafeHeight: number = AppStorage.get<number>('topSafeHeight') || 0
25 // @Provide bgc: Color = Color.White; 25 // @Provide bgc: Color = Color.White;
26 @Provide duration: number = 0 26 @Provide duration: number = 0
  27 + @State noAnimation: boolean = true
  28 +
  29 + pageTransition() {
  30 + // PageTransitionEnter({ duration: this.noAnimation ? 0 : 300 })
  31 + PageTransitionExit({ duration: !this.noAnimation ? 0 : 300 })
  32 + }
  33 +
27 34
28 aboutToAppear(): void { 35 aboutToAppear(): void {
29 //获取宽高尺寸 36 //获取宽高尺寸
@@ -65,6 +72,7 @@ export struct MultiPictureListPage { @@ -65,6 +72,7 @@ export struct MultiPictureListPage {
65 }) 72 })
66 .onClick(() => { 73 .onClick(() => {
67 this.onBack(); 74 this.onBack();
  75 + this.noAnimation = false
68 router.back(); 76 router.back();
69 }) 77 })
70 .id("backImg") 78 .id("backImg")