未验证 提交 957d1ce4 编写于 作者: S songqq0825 提交者: Gitee

修改固定宽高比位置使demo运行正常

Signed-off-by: Nsongqq0825 <songqinqin4@huawei.com>
上级 7f9c6961
...@@ -419,8 +419,8 @@ struct ScaleCapabilitySample { ...@@ -419,8 +419,8 @@ struct ScaleCapabilitySample {
Flex({ justifyContent: FlexAlign.Center, alignItems: ItemAlign.Center }) { Flex({ justifyContent: FlexAlign.Center, alignItems: ItemAlign.Center }) {
Column() { Column() {
Image($r("app.media.illustrator")).width('100%').height('100%') Image($r("app.media.illustrator")).width('100%').height('100%')
}
.aspectRatio(1) // 固定宽高比 .aspectRatio(1) // 固定宽高比
}
.border({ width: 2, color: "#66F1CCB8"}) // 边框,仅用于展示效果 .border({ width: 2, color: "#66F1CCB8"}) // 边框,仅用于展示效果
} }
.backgroundColor("#FFFFFF") .backgroundColor("#FFFFFF")
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册