From 6d439232793d0eaf807d9f123268a4895076a594 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E6=AC=A2?= Date: Mon, 20 May 2024 15:25:19 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=87=92=E5=8A=A0=E8=BD=BD?= =?UTF-8?q?=E5=9C=A8=E5=A4=9A=E6=AC=A1=E7=82=B9=E5=87=BB=E5=87=BA=E7=8E=B0?= =?UTF-8?q?=E5=8D=A1=E6=AD=BB=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 张欢 --- CHANGELOG.md | 1 + .../main/ets/components/imageknife/ImageKnifeComponent.ets | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2ff4129..9ec10d5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,7 @@ ## 2.2.0-rc.3 - 修复错误图绘制完后变成占位图 - 提供图片加载成功/失败的事件 +- 修复懒加载在多次点击出现卡死的问题 ## 2.2.0-rc.2 - ImageKnife支持下采样 diff --git a/library/src/main/ets/components/imageknife/ImageKnifeComponent.ets b/library/src/main/ets/components/imageknife/ImageKnifeComponent.ets index 8ce6f3f..209aed4 100644 --- a/library/src/main/ets/components/imageknife/ImageKnifeComponent.ets +++ b/library/src/main/ets/components/imageknife/ImageKnifeComponent.ets @@ -386,7 +386,9 @@ export struct ImageKnifeComponent { this.lastSrc = this.imageKnifeOption.loadSrc; } this.detachFromLayout = this.request.detachFromLayout; - this.configNecessary(this.request); + if (this.request.loadSrc!=this.lastSrc) { + this.configNecessary(this.request); + } this.configCacheStrategy(this.request); this.configDisplay(this.request); this.configHspContext(this.request);