From 44c5b3f9d8804828ef26d9fd4bbdd24a7b832535 Mon Sep 17 00:00:00 2001 From: 189******51 Date: Fri, 1 Sep 2023 09:30:33 +0000 Subject: [PATCH] =?UTF-8?q?IssueNo:=20#I7XVG3:[=E6=96=B0=E9=9C=80=E6=B1=82?= =?UTF-8?q?]:=20Rectify=20the=20arkts=20syntax=203=20Description:=20Rectif?= =?UTF-8?q?y=20the=20arkts=20syntax=20in=20arkts-extend.md.=20Sig:=20SIG?= =?UTF-8?q?=5FApplicaitonFramework=20Feature=20or=20Bugfix:=20Feature=20Bi?= =?UTF-8?q?nary=20Source:=20No?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 189******51 --- .../quick-start/arkts-extend.md | 32 +++++++++---------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/zh-cn/application-dev/quick-start/arkts-extend.md b/zh-cn/application-dev/quick-start/arkts-extend.md index a238b695b6..cfea43912c 100644 --- a/zh-cn/application-dev/quick-start/arkts-extend.md +++ b/zh-cn/application-dev/quick-start/arkts-extend.md @@ -64,27 +64,27 @@ - \@Extend装饰的方法的参数可以为function,作为Event事件的句柄。 ```ts -@Extend(Text) function makeMeClick(onClick: () => void) { - .backgroundColor(Color.Blue) - .onClick(onClick) -} + @Extend(Text) function makeMeClick(onClick: () => void) { + .backgroundColor(Color.Blue) + .onClick(onClick) + } -@Entry -@Component -struct FancyUse { - @State label: string = 'Hello World'; + @Entry + @Component + struct FancyUse { + @State label: string = 'Hello World'; - onClickHandler() { - this.label = 'Hello ArkUI'; - } + onClickHandler() { + this.label = 'Hello ArkUI'; + } - build() { - Row({ space: 10 }) { - Text(`${this.label}`) - .makeMeClick(this.onClickHandler) + build() { + Row({ space: 10 }) { + Text(`${this.label}`) + .makeMeClick(this.onClickHandler) + } } } -} ``` - \@Extend的参数可以为[状态变量](arkts-state-management-overview.md),当状态变量改变时,UI可以正常的被刷新渲染。 -- GitLab