Showing
2 changed files
with
19 additions
and
2 deletions
| @@ -229,6 +229,11 @@ export struct MultiPictureDetailItemComponent { | @@ -229,6 +229,11 @@ export struct MultiPictureDetailItemComponent { | ||
| 229 | .gesture( | 229 | .gesture( |
| 230 | GestureGroup( | 230 | GestureGroup( |
| 231 | GestureMode.Exclusive, | 231 | GestureMode.Exclusive, |
| 232 | + // 单击返回上一层 | ||
| 233 | + TapGesture({ count: 1 }) | ||
| 234 | + .onAction(() => { | ||
| 235 | + router.back() | ||
| 236 | + }), | ||
| 232 | // TODO:知识点:双击切换图片大小 | 237 | // TODO:知识点:双击切换图片大小 |
| 233 | TapGesture({ count: 2 }) | 238 | TapGesture({ count: 2 }) |
| 234 | .onAction(() => { | 239 | .onAction(() => { |
| @@ -26,9 +26,21 @@ export struct MultiPictureListPage { | @@ -26,9 +26,21 @@ export struct MultiPictureListPage { | ||
| 26 | @Provide duration: number = 0 | 26 | @Provide duration: number = 0 |
| 27 | @State noAnimation: boolean = true | 27 | @State noAnimation: boolean = true |
| 28 | 28 | ||
| 29 | + // pageTransition() { | ||
| 30 | + // // PageTransitionEnter({ duration: this.noAnimation ? 0 : 300 }) | ||
| 31 | + // PageTransitionExit({ duration: !this.noAnimation ? 0 : 300 }) | ||
| 32 | + // } | ||
| 33 | + | ||
| 29 | pageTransition() { | 34 | pageTransition() { |
| 30 | - // PageTransitionEnter({ duration: this.noAnimation ? 0 : 300 }) | ||
| 31 | - PageTransitionExit({ duration: !this.noAnimation ? 0 : 300 }) | 35 | + // 为目标页面时,进入:从右边侧滑入,退出:是右侧划出;跳转别的页面:左侧划出,返回:左侧划入。 |
| 36 | + PageTransitionEnter({ type: RouteType.Push, duration: 300 }) | ||
| 37 | + .slide(SlideEffect.Right) | ||
| 38 | + PageTransitionEnter({ type: RouteType.Pop, duration: 300 }) | ||
| 39 | + .slide(SlideEffect.Left) | ||
| 40 | + PageTransitionExit({ type: RouteType.Push, duration: 300 }) | ||
| 41 | + .slide(SlideEffect.Left) | ||
| 42 | + PageTransitionExit({ type: RouteType.Pop, duration: 300 }) | ||
| 43 | + .slide(SlideEffect.Right) | ||
| 32 | } | 44 | } |
| 33 | 45 | ||
| 34 | aboutToAppear(): void { | 46 | aboutToAppear(): void { |
-
Please register or login to post a comment