未验证 提交 3b458b60 编写于 作者: O openharmony_ci 提交者: Gitee

!8754 【轻量级 PR】:【OpenHarmony开源贡献者计划2022】update...

!8754 【轻量级 PR】:【OpenHarmony开源贡献者计划2022】update zh-cn/application-dev/reference/arkui-ts/ts-transition-animation-component.md.
Merge pull request !8754 from 小桂子家滴/N/A
......@@ -32,7 +32,7 @@
@Entry
@Component
struct TransitionExample {
@State btn1: boolean = false
@State btn: boolean = false
@State show: string = "show"
build() {
......@@ -40,15 +40,15 @@ struct TransitionExample {
Button(this.show).width(80).height(30).backgroundColor(0x317aff).margin({bottom:50})
.onClick(() => {
animateTo({ duration: 1000 }, () => {
this.btn1 = !this.btn1
if(this.btn1){
this.btn = !this.btn
if(this.btn){
this.show = "hide"
}else{
this.show = "show"
}
})
})
if (this.btn1) {
if (this.btn) {
// 插入和删除配置为不同的过渡效果
Button() {
Image($r('app.media.bg1')).width("80%").height(300)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册