未验证 提交 44f4b40c 编写于 作者: 小桂子家滴 提交者: Gitee

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

因btn变量名只有一个,规范其变量名;
Signed-off-by: N小桂子家滴 <3579950173@qq.com>
Signed-off-by: N小桂子家滴 <3579950173@qq.com>
上级 aa2cda55
......@@ -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.
先完成此消息的编辑!
想要评论请 注册