diff --git a/zh-cn/application-dev/reference/arkui-ts/ts-page-transition-animation.md b/zh-cn/application-dev/reference/arkui-ts/ts-page-transition-animation.md index c94d72831575816d8b7589dbdf297698ccce541b..2befc061e45ef0377f018b58ea495034a4aebbad 100644 --- a/zh-cn/application-dev/reference/arkui-ts/ts-page-transition-animation.md +++ b/zh-cn/application-dev/reference/arkui-ts/ts-page-transition-animation.md @@ -61,13 +61,13 @@ struct PageTransitionExample1 { @State opacity1: number = 1 build() { - Column() { + Column() { Navigator({ target: 'pages/page1', type: NavigationType.Push }) { - Image($r('app.media.bg1')).width("100%").height("100%") + Image($r('app.media.bg1')).width('100%').height('100%') } }.scale({ x: this.scale1 }).opacity(this.opacity1) } -// 自定义方式1:完全自定义转场过程的效果 + // 自定义方式1:完全自定义转场过程的效果 pageTransition() { PageTransitionEnter({ duration: 1200, curve: Curve.Linear }) .onEnter((type: RouteType, progress: number) => { @@ -93,12 +93,12 @@ struct AExample { build() { Column() { - Navigator({ target: 'pages/index' ,type: NavigationType.Push}) { - Image($r('app.media.bg2')).width("100%").height("100%") + Navigator({ target: 'pages/index', type: NavigationType.Push }) { + Image($r('app.media.bg2')).width('100%').height('100%') } }.height("100%").width("100%").scale({ x: this.scale2 }).opacity(this.opacity2) } -// 自定义方式1:完全自定义转场过程的效果 + // 自定义方式1:完全自定义转场过程的效果 pageTransition() { PageTransitionEnter({ duration: 1200, curve: Curve.Linear }) .onEnter((type: RouteType, progress: number) => { @@ -129,12 +129,12 @@ struct PageTransitionExample { build() { Column() { Navigator({ target: 'pages/page1', type: NavigationType.Push }) { - Image($r('app.media.bg1')).width("100%").height("100%") + Image($r('app.media.bg1')).width('100%').height('100%') } }.scale({ x: this.scale1 }).opacity(this.opacity1) } -// 自定义方式2:使用系统提供的多种默认效果(平移、缩放、透明度等) + // 自定义方式2:使用系统提供的多种默认效果(平移、缩放、透明度等) pageTransition() { PageTransitionEnter({ duration: 1200 }) .slide(SlideEffect.Left) @@ -152,16 +152,16 @@ struct PageTransitionExample { struct PageTransitionExample1 { @State scale2: number = 1 @State opacity2: number = 1 - + build() { Column() { Navigator({ target: 'pages/index', type: NavigationType.Push }) { - Image($r('app.media.bg2')).width ("100%").height("100%") + Image($r('app.media.bg2')).width('100%').height('100%') } }.scale({ x: this.scale2 }).opacity(this.opacity2) } -// 自定义方式2:使用系统提供的多种默认效果(平移、缩放、透明度等) + // 自定义方式2:使用系统提供的多种默认效果(平移、缩放、透明度等) pageTransition() { PageTransitionEnter({ duration: 1200 }) .slide(SlideEffect.Left)