From b112249fc536db2385788cec65892e5d32d5b29d 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 --- .../ets/components/ImageKnifeAnimatorComponent.ets | 11 ++++++++++- .../src/main/ets/components/ImageKnifeComponent.ets | 13 +++++++++---- 2 files changed, 19 insertions(+), 5 deletions(-) diff --git a/library/src/main/ets/components/ImageKnifeAnimatorComponent.ets b/library/src/main/ets/components/ImageKnifeAnimatorComponent.ets index ed998c1..36908f6 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..26769bb 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)) } } @@ -112,9 +116,10 @@ export struct ImageKnifeComponent { 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) + + ' loadSrc = ' + this.imageKnifeOption.loadSrc + + ' placeholderSrc = ' + this.imageKnifeOption.placeholderSrc + + ' errorholderSrc = ' + this.imageKnifeOption.errorholderSrc + + ' componentId = ' + this.getUniqueId()) ImageKnife.getInstance().execute(this.getRequest(this.currentWidth, this.currentHeight)) }