未验证 提交 b5109e35 编写于 作者: 耿文广 提交者: Gitee

update zh-cn/application-dev/quick-start/arkts-state-management-best-practices.md.

Signed-off-by: N耿文广 <gengwenguang@huawei.com>
上级 e8892d44
...@@ -571,13 +571,13 @@ struct ParentComp { ...@@ -571,13 +571,13 @@ struct ParentComp {
build() { build() {
Row() { Row() {
Column() { Column() {
CounterComp({ value: this.counter[0], subValue: this.counter[0].subCounter[0] }) CounterComp({ value: this.counter[0], subValue: this.counter[0].subCounter })
CounterComp({ value: this.counter[1], subValue: this.counter[1].subCounter[0] }) CounterComp({ value: this.counter[1], subValue: this.counter[1].subCounter })
CounterComp({ value: this.counter[2], subValue: this.counter[2].subCounter[0] }) CounterComp({ value: this.counter[2], subValue: this.counter[2].subCounter })
Divider().height(5) Divider().height(5)
ForEach(this.counter, ForEach(this.counter,
(item: ParentCounter) => { (item: ParentCounter) => {
CounterComp({ value: item, subValue: item.subCounter[0] }) CounterComp({ value: item, subValue: item.subCounter })
}, },
(item: ParentCounter) => item.id.toString() (item: ParentCounter) => item.id.toString()
) )
...@@ -668,13 +668,13 @@ struct ParentComp { ...@@ -668,13 +668,13 @@ struct ParentComp {
build() { build() {
Row() { Row() {
Column() { Column() {
CounterComp({ value: this.counter[0], subValue: this.counter[0].subCounter[0] }) CounterComp({ value: this.counter[0], subValue: this.counter[0].subCounter })
CounterComp({ value: this.counter[1], subValue: this.counter[1].subCounter[0] }) CounterComp({ value: this.counter[1], subValue: this.counter[1].subCounter })
CounterComp({ value: this.counter[2], subValue: this.counter[2].subCounter[0] }) CounterComp({ value: this.counter[2], subValue: this.counter[2].subCounter })
Divider().height(5) Divider().height(5)
ForEach(this.counter, ForEach(this.counter,
(item: ParentCounter) => { (item: ParentCounter) => {
CounterComp({ value: item, subValue: item.subCounter[0] }) CounterComp({ value: item, subValue: item.subCounter })
}, },
(item: ParentCounter) => item.id.toString() (item: ParentCounter) => item.id.toString()
) )
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册