From 74bc24d61d13e143d1e1d5b1d30bb2bcd3260a7a Mon Sep 17 00:00:00 2001 From: madixin Date: Sat, 23 Nov 2024 11:56:14 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E5=96=84=E6=97=A5=E5=BF=97=EF=BC=8C?= =?UTF-8?q?=E8=A1=A5=E5=85=85=E7=BB=84=E4=BB=B6id=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: madixin --- .../components/ImageKnifeAnimatorComponent.ets | 11 ++++++++++- .../main/ets/components/ImageKnifeComponent.ets | 15 ++++++++++----- 2 files changed, 20 insertions(+), 6 deletions(-) diff --git a/library/src/main/ets/components/ImageKnifeAnimatorComponent.ets b/library/src/main/ets/components/ImageKnifeAnimatorComponent.ets index ed998c1..a88e775 100644 --- a/library/src/main/ets/components/ImageKnifeAnimatorComponent.ets +++ b/library/src/main/ets/components/ImageKnifeAnimatorComponent.ets @@ -75,7 +75,11 @@ export struct ImageKnifeAnimatorComponent { } else { // 前提:宽高值均有效,值>0. 条件1:当前宽高与上一次宽高不同 条件2:当前是第一次绘制 if (this.currentHeight != this.lastHeight || this.currentWidth != this.lastWidth) { - LogUtil.log('execute request:width=' + this.currentWidth + ' height= ' + this.currentHeight) + LogUtil.log('onSizeChange execute request:width=' + this.currentWidth + ' height= ' + this.currentHeight + + ' loadSrc = ' + this.imageKnifeOption.loadSrc + + ' placeholderSrc = ' + this.imageKnifeOption.placeholderSrc + + ' errorholderSrc = ' + this.imageKnifeOption.errorholderSrc + + ' componentId = ' + this.getUniqueId()) ImageKnife.getInstance().execute(this.getRequest(this.currentWidth, this.currentHeight),true) } } @@ -93,6 +97,11 @@ export struct ImageKnifeAnimatorComponent { } this.request = undefined this.componentVersion++ + LogUtil.log('watchImageKnifeOption execute request:width=' + this.currentWidth + ' height= ' + this.currentHeight + + ' loadSrc = ' + this.imageKnifeOption.loadSrc + + ' placeholderSrc = ' + this.imageKnifeOption.placeholderSrc + + ' errorholderSrc = ' + this.imageKnifeOption.errorholderSrc + + ' componentId = ' + this.getUniqueId()) ImageKnife.getInstance().execute(this.getRequest(this.currentWidth, this.currentHeight),true) } diff --git a/library/src/main/ets/components/ImageKnifeComponent.ets b/library/src/main/ets/components/ImageKnifeComponent.ets index ed30334..7c88647 100644 --- a/library/src/main/ets/components/ImageKnifeComponent.ets +++ b/library/src/main/ets/components/ImageKnifeComponent.ets @@ -100,7 +100,11 @@ export struct ImageKnifeComponent { } else { // 前提:宽高值均有效,值>0. 条件1:当前宽高与上一次宽高不同 条件2:当前是第一次绘制 if (this.currentHeight != this.lastHeight || this.currentWidth != this.lastWidth) { - LogUtil.log('execute request:width=' + this.currentWidth + ' height= ' + this.currentHeight) + LogUtil.log('onSizeChange execute request:width=' + this.currentWidth + ' height= ' + this.currentHeight + + ' loadSrc = ' + this.imageKnifeOption.loadSrc + + ' placeholderSrc = ' + this.imageKnifeOption.placeholderSrc + + ' errorholderSrc = ' + this.imageKnifeOption.errorholderSrc + + ' componentId = ' + this.getUniqueId()) ImageKnife.getInstance().execute(this.getRequest(this.currentWidth, this.currentHeight)) } } @@ -111,10 +115,11 @@ export struct ImageKnifeComponent { this.clearLastRequest() this.componentVersion++ this.objectFit = this.imageKnifeOption.objectFit === undefined ? ImageFit.Contain : this.imageKnifeOption.objectFit - LogUtil.log('watchImageKnifeOption execute request:width=' + this.currentWidth + ' height= ' + this.currentHeight - + ' loadSrc = ' + this.request?.imageKnifeOption.loadSrc - + ' placeholderSrc = ' + this.request?.imageKnifeOption.placeholderSrc - + ' errorholderSrc = ' + this.request?.imageKnifeOption.errorholderSrc) + LogUtil.log('watchImageKnifeOption execute request:width=' + this.currentWidth + ' height= ' + this.currentHeight + + ' loadSrc = ' + this.imageKnifeOption.loadSrc + + ' placeholderSrc = ' + this.imageKnifeOption.placeholderSrc + + ' errorholderSrc = ' + this.imageKnifeOption.errorholderSrc + + ' componentId = ' + this.getUniqueId()) ImageKnife.getInstance().execute(this.getRequest(this.currentWidth, this.currentHeight)) }