From 44f4b40c26c19e73f53a3d1b1cc2a208b53dbead Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B0=8F=E6=A1=82=E5=AD=90=E5=AE=B6=E6=BB=B4?= <3579950173@qq.com> Date: Fri, 26 Aug 2022 08:40:18 +0000 Subject: [PATCH] =?UTF-8?q?update=20zh-cn/application-dev/reference/arkui-?= =?UTF-8?q?ts/ts-transition-animation-component.md.=20=E5=9B=A0btn?= =?UTF-8?q?=E5=8F=98=E9=87=8F=E5=90=8D=E5=8F=AA=E6=9C=89=E4=B8=80=E4=B8=AA?= =?UTF-8?q?=EF=BC=8C=E8=A7=84=E8=8C=83=E5=85=B6=E5=8F=98=E9=87=8F=E5=90=8D?= =?UTF-8?q?=EF=BC=9B=20Signed-off-by:=20=E5=B0=8F=E6=A1=82=E5=AD=90?= =?UTF-8?q?=E5=AE=B6=E6=BB=B4=20<3579950173@qq.com>?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 小桂子家滴 <3579950173@qq.com> --- .../arkui-ts/ts-transition-animation-component.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/zh-cn/application-dev/reference/arkui-ts/ts-transition-animation-component.md b/zh-cn/application-dev/reference/arkui-ts/ts-transition-animation-component.md index f439e53e9b..3ed7aabe42 100644 --- a/zh-cn/application-dev/reference/arkui-ts/ts-transition-animation-component.md +++ b/zh-cn/application-dev/reference/arkui-ts/ts-transition-animation-component.md @@ -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) -- GitLab