From 240a2658a77419564bbe07f76ba1b29c7205110f Mon Sep 17 00:00:00 2001 From: "2206069183@qq.com" <2206069183@qq.com> Date: Mon, 29 Apr 2024 10:19:22 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9heic=E5=9B=BE=E7=89=87?= =?UTF-8?q?=E5=B1=95=E7=A4=BAdemo?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 2206069183@qq.com <2206069183@qq.com> --- CHANGELOG.md | 3 +++ entry/src/main/ets/pages/testImageKnifeHeic.ets | 13 +++++-------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index bab7ab2..de3dadb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +## 2.2.0-rc.2 +- ImageKnife支持heic图片修改demo,按钮控制组件是否展示 + ## 2.2.0-rc.1 - 修改ImageKnife跳过网络,点击默认,图片没有传入宽高,无显示bug - ImageKnife支持根据自定义key获取已缓存的图片 diff --git a/entry/src/main/ets/pages/testImageKnifeHeic.ets b/entry/src/main/ets/pages/testImageKnifeHeic.ets index e5f72ff..aa3592f 100644 --- a/entry/src/main/ets/pages/testImageKnifeHeic.ets +++ b/entry/src/main/ets/pages/testImageKnifeHeic.ets @@ -28,17 +28,14 @@ struct testImageKnifeHeic { @State flag: boolean = true; build() { - Flex({ direction: FlexDirection.Row, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center }) { Button("heic图片测试") .onClick(() => { this.flag = !this.flag - if (this.flag) { - this.imageKnifeOption1.errorholderSrc = $r('app.media.icon_loading') - } else { - this.imageKnifeOption1.errorholderSrc = $r('app.media.icon_failed') - } }).margin({ top: 15 }) - ImageKnifeComponent({ imageKnifeOption: this.imageKnifeOption1 }).width(300).height(300) - }.width('100%').height(300).backgroundColor(Color.Pink) + if(this.flag) { + ImageKnifeComponent({ imageKnifeOption: this.imageKnifeOption1 }).width(300).height(300) + } + }.width('100%').height(400).backgroundColor(Color.Pink) } } \ No newline at end of file