From b5109e352273497e0aef0e7eb1ff4a23e541da9e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=80=BF=E6=96=87=E5=B9=BF?= Date: Mon, 4 Sep 2023 08:42:58 +0000 Subject: [PATCH] update zh-cn/application-dev/quick-start/arkts-state-management-best-practices.md. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 耿文广 --- .../arkts-state-management-best-practices.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/zh-cn/application-dev/quick-start/arkts-state-management-best-practices.md b/zh-cn/application-dev/quick-start/arkts-state-management-best-practices.md index 64142524bb..d52f598d46 100644 --- a/zh-cn/application-dev/quick-start/arkts-state-management-best-practices.md +++ b/zh-cn/application-dev/quick-start/arkts-state-management-best-practices.md @@ -571,13 +571,13 @@ struct ParentComp { build() { Row() { Column() { - CounterComp({ value: this.counter[0], subValue: this.counter[0].subCounter[0] }) - CounterComp({ value: this.counter[1], subValue: this.counter[1].subCounter[0] }) - CounterComp({ value: this.counter[2], subValue: this.counter[2].subCounter[0] }) + CounterComp({ value: this.counter[0], subValue: this.counter[0].subCounter }) + CounterComp({ value: this.counter[1], subValue: this.counter[1].subCounter }) + CounterComp({ value: this.counter[2], subValue: this.counter[2].subCounter }) Divider().height(5) ForEach(this.counter, (item: ParentCounter) => { - CounterComp({ value: item, subValue: item.subCounter[0] }) + CounterComp({ value: item, subValue: item.subCounter }) }, (item: ParentCounter) => item.id.toString() ) @@ -668,13 +668,13 @@ struct ParentComp { build() { Row() { Column() { - CounterComp({ value: this.counter[0], subValue: this.counter[0].subCounter[0] }) - CounterComp({ value: this.counter[1], subValue: this.counter[1].subCounter[0] }) - CounterComp({ value: this.counter[2], subValue: this.counter[2].subCounter[0] }) + CounterComp({ value: this.counter[0], subValue: this.counter[0].subCounter }) + CounterComp({ value: this.counter[1], subValue: this.counter[1].subCounter }) + CounterComp({ value: this.counter[2], subValue: this.counter[2].subCounter }) Divider().height(5) ForEach(this.counter, (item: ParentCounter) => { - CounterComp({ value: item, subValue: item.subCounter[0] }) + CounterComp({ value: item, subValue: item.subCounter }) }, (item: ParentCounter) => item.id.toString() ) -- GitLab