From a8c6f04f1f5fb14a764a7efaa2b13a0f538a0d73 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=80=BF=E6=96=87=E5=B9=BF?= Date: Fri, 1 Sep 2023 02:40:09 +0000 Subject: [PATCH] update zh-cn/application-dev/quick-start/arkts-state.md. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 耿文广 --- .../quick-start/arkts-state.md | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/zh-cn/application-dev/quick-start/arkts-state.md b/zh-cn/application-dev/quick-start/arkts-state.md index d0965be247..857c1244f3 100644 --- a/zh-cn/application-dev/quick-start/arkts-state.md +++ b/zh-cn/application-dev/quick-start/arkts-state.md @@ -296,14 +296,14 @@ struct MyComponent { 2. 对于\@State来说,命名参数机制传递的值并不是必选的,如果没有命名参数传值,则使用本地初始化的默认值: ```ts -class C1 { - public count:number; - public increaseBy:number; - constructor(count: number, increaseBy:number) { - this.count = count; - this.increaseBy = increaseBy; - } -} -let obj = new C1(1, 2) -MyComponent(obj) + class C1 { + public count:number; + public increaseBy:number; + constructor(count: number, increaseBy:number) { + this.count = count; + this.increaseBy = increaseBy; + } + } + let obj = new C1(1, 2) + MyComponent(obj) ``` -- GitLab