From c87e5cf5f2fa142e00c0c15b0a2b58bc0328bbf2 Mon Sep 17 00:00:00 2001 From: LiAn Date: Mon, 10 Jul 2023 08:55:48 +0000 Subject: [PATCH] update zh-cn/application-dev/reference/arkui-ts/ts-basic-components-image.md. Signed-off-by: LiAn --- .../arkui-ts/ts-basic-components-image.md | 48 +++---------------- 1 file changed, 7 insertions(+), 41 deletions(-) diff --git a/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-image.md b/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-image.md index a87005436a..59334fbdfe 100644 --- a/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-image.md +++ b/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-image.md @@ -97,61 +97,27 @@ Image(src: PixelMap | ResourceStr | DrawableDescriptor) @Entry @Component struct ImageExample1 { - private on: string = 'www.example.com' - @State src: string = this.on - build() { Column() { Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Start }) { - Text('default').fontSize(16).fontColor(0xcccccc).height(30) Row({ space: 5 }) { - Image($r('app.media.ic_png')) + Image($r('app.media.ic_camera_master_ai_leaf')) .width(110).height(110).border({ width: 1 }) .overlay('png', { align: Alignment.Bottom, offset: { x: 0, y: 20 } }) - Image($r('app.media.ic_gif')) + Image($r('app.media.dongxiao')) .width(110).height(110).border({ width: 1 }) .overlay('gif', { align: Alignment.Bottom, offset: { x: 0, y: 20 } }) - Image($r('app.media.ic_svg')) - .width(110).height(110).border({ width: 1 }) - .overlay('svg', { align: Alignment.Bottom, offset: { x: 0, y: 20 } }) } + Row({ space: 5 }) { - Image($r('app.media.img_example')) + Image($r('app.media.ic_camera_master_ai_clouded')) .width(110).height(110).border({ width: 1 }) - .overlay('jpg', { align: Alignment.Bottom, offset: { x: 0, y: 20 } }) - Image(this.src) + .overlay('svg', { align: Alignment.Bottom, offset: { x: 0, y: 20 } }) + Image($r('app.media.ic_public_favor_filled')) .width(110).height(110).border({ width: 1 }) - .overlay('network', { align: Alignment.Bottom, offset: { x: 0, y: 20 } }) + .overlay('jpg', { align: Alignment.Bottom, offset: { x: 0, y: 20 } }) }.margin({ top: 25, bottom: 10 }) } - - Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Start }) { - Text('objectFit').fontSize(16).fontColor(0xcccccc).height(30) - Row({ space: 5 }) { - Image($r('app.media.img_example')) - .border({ width: 1 }) - .objectFit(ImageFit.None).width(110).height(110) - .overlay('None', { align: Alignment.Bottom, offset: { x: 0, y: 20 } }) - Image($r('app.media.img_example')) - .border({ width: 1 }) - .objectFit(ImageFit.Fill).width(110).height(110) - .overlay('Fill', { align: Alignment.Bottom, offset: { x: 0, y: 20 } }) - Image($r('app.media.img_example')) - .border({ width: 1 }) - .objectFit(ImageFit.Cover).width(110).height(110) - .overlay('Cover', { align: Alignment.Bottom, offset: { x: 0, y: 20 } }) - } - Row({ space: 5 }) { - Image($r('app.media.img_example_w250')) - .border({ width: 1 }) - .objectFit(ImageFit.Contain).width(110).height(110) - .overlay('Contain', { align: Alignment.Bottom, offset: { x: 0, y: 20 } }) - Image($r('app.media.img_example_w250')) - .border({ width: 1 }) - .objectFit(ImageFit.ScaleDown).width(110).height(110) - .overlay('ScaleDown', { align: Alignment.Bottom, offset: { x: 0, y: 20 } }) - }.margin({ top: 25 }) - } }.height(320).width(360).padding({ right: 10, top: 10 }) } } -- GitLab