From 3f06f8dc0f859fb7a4f1083a9bf72e729c3a22f7 Mon Sep 17 00:00:00 2001 From: sienna1128 Date: Thu, 29 Sep 2022 11:49:48 +0800 Subject: [PATCH] update docs Signed-off-by: sienna1128 --- .../ts-universal-attributes-layout-constraints.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/zh-cn/application-dev/reference/arkui-ts/ts-universal-attributes-layout-constraints.md b/zh-cn/application-dev/reference/arkui-ts/ts-universal-attributes-layout-constraints.md index 2b2ddafc55..55be6f6661 100644 --- a/zh-cn/application-dev/reference/arkui-ts/ts-universal-attributes-layout-constraints.md +++ b/zh-cn/application-dev/reference/arkui-ts/ts-universal-attributes-layout-constraints.md @@ -22,7 +22,7 @@ @Entry @Component struct AspectRatioExample { - private children: string[] = ['1', '2', '3', '4', '5', '6'] + private children: string[] = ['1', '2', '3', '4', '5', '6']; build() { Column({ space: 20 }) { @@ -77,13 +77,13 @@ struct AspectRatioExample { ```ts class ContainerInfo { - label: string = '' - size: string = '' + label: string = ''; + size: string = ''; } class ChildInfo { - text: string = '' - priority: number = 0 + text: string = ''; + priority: number = 0; } @Entry @@ -102,14 +102,14 @@ struct DisplayPriorityExample { { text: '4\n(priority:1)', priority: 1 }, { text: '5\n(priority:2)', priority: 2 } ] - @State currentIndex: number = 0 + @State currentIndex: number = 0; build() { Column({ space: 10 }) { // 切换父级容器大小 Button(this.container[this.currentIndex].label).backgroundColor(0x317aff) .onClick(() => { - this.currentIndex = (this.currentIndex + 1) % this.container.length + this.currentIndex = (this.currentIndex + 1) % this.container.length; }) // 通过变量设置Flex父容器宽度 Flex({ justifyContent: FlexAlign.SpaceBetween }) { -- GitLab