提交 52d615fd 编写于 作者: H hwx1119949 提交者: 周末

fixed f1bec181 from https://gitee.com/huyisuo/docs/pulls/22228

prop demo update
Signed-off-by: Nhwx1119949 <huyisuo@huawei.com>
Change-Id: I4de12357767c01a3e62aadc223b883fba9a4db4d
上级 b5220e39
......@@ -320,11 +320,11 @@ struct MyComponent {
}
Row() {
Button('Click to change locally !').width(480).height(60).margin({ top: 10 })
Button('Click to change locally !').width(180).height(60).margin({ top: 10 })
.onClick(() => {
this.customCounter2++
})
}.height(100).width(480)
}.height(100).width(180)
Row() {
Text(`Custom Local: ${this.customCounter2}`).width(90).height(40).fontColor('#FF0010')
......@@ -355,7 +355,7 @@ struct MainProgram {
MyComponent({ customCounter: this.mainCounter })
// customCounter2也可以从父组件初始化,父组件初始化的值会覆盖子组件customCounter2的本地初始化的值
MyComponent({ customCounter: this.mainCounter, customCounter2: this.mainCounter })
}.width('40%')
}
}
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册