未验证 提交 ab189272 编写于 作者: O openharmony_ci 提交者: Gitee

!18182 示例代码Image增加layoutWeight属性避免Image布局超出设定的FlowItem范围

Merge pull request !18182 from 李俊峰/waterflow_code
...@@ -260,6 +260,8 @@ struct WaterflowDemo { ...@@ -260,6 +260,8 @@ struct WaterflowDemo {
Text("N" + item).fontSize(12).height('16') Text("N" + item).fontSize(12).height('16')
Image('res/waterFlowTest(' + item % 5 + ').jpg') Image('res/waterFlowTest(' + item % 5 + ').jpg')
.objectFit(ImageFit.Fill) .objectFit(ImageFit.Fill)
.width('100%')
.layoutWeight(1)
} }
} }
.width(this.itemWidthArray[item]) .width(this.itemWidthArray[item])
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册