未验证 提交 5447cc5a 编写于 作者: L luoying_ace 提交者: Gitee

update zh-cn/application-dev/reference/arkui-ts/ts-transition-animation-shared-elements.md.

Signed-off-by: Nluoying_ace <luoying19@huawei.com>
上级 d9d67090
...@@ -27,20 +27,14 @@ struct SharedTransitionExample { ...@@ -27,20 +27,14 @@ struct SharedTransitionExample {
@State active: boolean = false @State active: boolean = false
build() { build() {
List() { Column() {
ListItem() { Navigator({ target: 'pages/PageB', type: NavigationType.Push }) {
Row() { Image($r('app.media.ic_health_heart')).width(50).height(50)
Navigator({ target: 'pages/common/Animation/transAnimation/PageB', type: NavigationType.Push }) { .sharedTransition('sharedImage', { duration: 800, curve: Curve.Linear, delay: 100 })
Image($r('app.media.ic_health_heart')).width(50).height(50) }.padding({ left: 20, top: 20 })
.sharedTransition('sharedImage1', { duration: 800, curve: Curve.Linear, delay: 100 }) .onClick(() => {
}.padding({ left: 10 }) this.active = true
.onClick(() => { })
this.active = true
})
Text('SharedTransition').width(80).height(80).textAlign(TextAlign.Center)
}
}
} }
} }
} }
...@@ -50,14 +44,12 @@ struct SharedTransitionExample { ...@@ -50,14 +44,12 @@ struct SharedTransitionExample {
// PageB.ets // PageB.ets
@Entry @Entry
@Component @Component
struct BExample { struct pageBExample {
build() { build() {
Stack() { Stack() {
Image($r('app.media.ic_health_heart')).width(150).height(150).sharedTransition('sharedImage1') Image($r('app.media.ic_health_heart')).width(150).height(150).sharedTransition('sharedImage')
}.width('100%').height(400) }.width('100%').height('100%')
} }
} }
``` ```
![zh-cn_image_0000001219744195](figures/zh-cn_image_0000001219744195.gif)
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册