未验证 提交 89f6a794 编写于 作者: O openharmony_ci 提交者: Gitee

!22228 update prop demo

Merge pull request !22228 from 周末/master
......@@ -528,11 +528,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')
......@@ -563,7 +563,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.
先完成此消息的编辑!
想要评论请 注册