From 97b2f4a31867deefd2a6f2708fcec2c21214fc7c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=94=B0=E9=9B=A8?= Date: Thu, 8 Dec 2022 03:18:00 +0000 Subject: [PATCH] update zh-cn/application-dev/quick-start/arkts-basic-ui-description.md. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 田雨 --- .../quick-start/arkts-basic-ui-description.md | 26 +++++++++---------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/zh-cn/application-dev/quick-start/arkts-basic-ui-description.md b/zh-cn/application-dev/quick-start/arkts-basic-ui-description.md index ebc415b897..c16d49076c 100644 --- a/zh-cn/application-dev/quick-start/arkts-basic-ui-description.md +++ b/zh-cn/application-dev/quick-start/arkts-basic-ui-description.md @@ -81,35 +81,35 @@ Text(`count: ${this.count}`) ```ts Text('test') - .fontSize(12) + .fontSize(12) ``` - 使用"."运算符进行链式调用并同时配置组件的多个属性,如下所示: ```ts Image('test.jpg') - .alt('error.jpg') - .width(100) - .height(100) + .alt('error.jpg') + .width(100) + .height(100) ``` - 除了直接传递常量参数外,还可以传递变量或表达式,如下所示: ```ts Text('hello') - .fontSize(this.size) + .fontSize(this.size) Image('test.jpg') - .width(this.count % 2 === 0 ? 100 : 200) - .height(this.offset + 100) + .width(this.count % 2 === 0 ? 100 : 200) + .height(this.offset + 100) ``` - 对于系统内置组件,框架还为其属性预定义了一些[枚举类型](../reference/arkui-ts/ts-appendix-enums.md)供开发人员调用,枚举类型可以作为参数传递,且必须满足参数类型要求。例如,可以按以下方式配置Text组件的颜色和字体属性: ```ts Text('hello') - .fontSize(20) - .fontColor(Color.Red) - .fontWeight(FontWeight.Bold) + .fontSize(20) + .fontColor(Color.Red) + .fontWeight(FontWeight.Bold) ``` ### 事件配置 @@ -156,11 +156,11 @@ Text(`count: ${this.count}`) ```ts Column() { Text('Hello') - .fontSize(100) + .fontSize(100) Divider() Text(this.myText) - .fontSize(100) - .fontColor(Color.Red) + .fontSize(100) + .fontColor(Color.Red) } ``` -- GitLab