未验证 提交 9a3c05cb 编写于 作者: W weiyu 提交者: Gitee

update zh-cn/application-dev/reference/arkui-ts/ts-universal-attributes-layout-constraints.md.

Signed-off-by: Nweiyucc <weiyucc@isoftstone.com>
上级 b305aa01
...@@ -75,7 +75,7 @@ struct AspectRatioExample { ...@@ -75,7 +75,7 @@ struct AspectRatioExample {
**图2** 横屏显示<br> **图2** 横屏显示<br>
![zh-cn_image_0000001174264382](figures/zh-cn_image_0000001174264382.gif) ![zh-cn_image_0000001174264382](figures/zh-cn_image_0000001174264382.gif)
``` ```ts
class ContainerInfo { class ContainerInfo {
label : string = '' label : string = ''
size : string = '' size : string = ''
...@@ -92,13 +92,15 @@ struct DisplayPriorityExample { ...@@ -92,13 +92,15 @@ struct DisplayPriorityExample {
private container : ContainerInfo[] = [ private container : ContainerInfo[] = [
{label: 'Big container', size: '90%'}, {label: 'Big container', size: '90%'},
{label: 'Middle container', size: '50%'}, {label: 'Middle container', size: '50%'},
{label: 'Small container', size: '30%'}] {label: 'Small container', size: '30%'}
]
private children : ChildInfo[] = [ private children : ChildInfo[] = [
{text: '1\n(priority:2)', priority: 2}, {text: '1\n(priority:2)', priority: 2},
{text: '2\n(priority:1)', priority: 1}, {text: '2\n(priority:1)', priority: 1},
{text: '3\n(priority:3)', priority: 3}, {text: '3\n(priority:3)', priority: 3},
{text: '4\n(priority:1)', priority: 1}, {text: '4\n(priority:1)', priority: 1},
{text: '5\n(priority:2)', priority: 2}] {text: '5\n(priority:2)', priority: 2}
]
@State currentIndex : number = 0 @State currentIndex : number = 0
build() { build() {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册